ast

package
v0.0.0-...-eb934a0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalizeASTIDs

func CanonicalizeASTIDs(in *solc.StorageLayout) *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