Module ethers_solc::artifacts::ast
source · Expand description
Bindings for the Solidity and Yul ASTs.
The Yul AST bindings are available in the yul module.
To gain an overview of the AST, it might be helpful to start at the entry point of a complete Solidity AST: the SourceUnit node.
§Version Support
These types should be compatible with at least Solidity 0.5.x and above, but may also support 0.4.x-0.5.x in most cases.
The legacy Solidity AST is not supported.
Modules§
- Types for the Yul AST.
Structs§
- An array type name.
- An assignment expression.
- Represents the AST field in the solc output
- A binary operation.
- A block of statements.
- The break keyword.
- A conditional expression.
- The continue keyword.
- A contract definition.
- A do while statement.
- An emit statement.
- An enum definition.
- An enum value.
- A custom error definition.
- An event definition.
- An expression statement.
- A reference to an external variable or slot in an inline assembly block.
- A for statement.
- A function call expression.
- A function call options expression (e.g.
x.f{gas: 1}
). - A function definition.
- A wrapper around IdentifierPath for the UsingForDirective.
- A function type name.
- An identifier.
- An identifier path.
- An if statement.
- An import directive.
- An index access.
- An index range access.
- An inheritance specifier.
- A block of inline assembly.
- A literal value.
- Represents the source location of a node:
<start byte>:<length>:<source index>
. - A mapping type.
- Member access.
- A modifier definition.
- A modifier or base constructor invocation.
- A
new
expression. - An override specifier.
- A parameter list.
- A placeholder statement (
_
) - A pragma directive.
- A return statement.
- A revert statement.
- Represents the source location of a node:
<start byte>:<length>:<source index>
. - The root node of a Solidity AST.
- A struct definition.
- A symbol alias.
- A try/catch clause.
- A try/catch statement.
- A tuple expression.
- A type description.
- A unary operation.
- An unchecked block.
- A user defined type name.
- A user defined value type definition.
- A using for directive.
- A variable declaration.
- A variable declaration statement.
- A while statement.
Enums§
- An assembly reference suffix.
- Assignment operators.
- Binary operators.
- All Solidity contract kinds.
- Function call kinds.
- Function kinds.
- Inline assembly flags.
- Literal kinds.
- Modifier invocation kinds.
- Variable mutability specifier.
- Function mutability specifier.
- Storage location specifier.
- Structured documentation (NatSpec).
- Unary operators.
- Visibility specifier.