ast

package
v1.1.4-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalizeASTIDs

func CanonicalizeASTIDs(in *solc.StorageLayout, monorepoBase string) *solc.StorageLayout

CanonicalizeASTIDs canonicalizes AST IDs in storage layouts so that they don't cause unnecessary conflicts/diffs. The implementation is not particularly efficient, but is plenty fast enough for our purposes. It works in two passes:

  1. First, it finds all AST IDs in storage and types, and builds a map to replace them in the second pass.
  2. The second pass performs the replacement.

This function returns a copy of the passed-in storage layout. The inefficiency comes from replaceType, which performs a linear search of all replacements when performing substring matches of composite types.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL