solidity_parser.ast.solnodes¶
Attributes¶
Classes¶
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
String identifier node |
|
Solidity reference type storage locations |
|
A name-value pair used for calling functions with options |
|
Solidity numerical unit types |
|
Constant value expression that can have an optional unit associated with it |
|
Single operand operation types |
|
Single operand expression |
|
Binary/two operand operation types, including assignment types |
|
Binary/two operand expression |
|
Choice expression that evaluates the given condition and returns one of the two given expressions |
|
New object allocation expression without constructor invocation |
|
Solidity 8 inline array creation |
|
Converts an address to a payable address |
|
Gets the value at the given index from the given array |
|
Gets a subarray at the given start and end indices from the given array |
|
Gets a member field or method from a given object |
|
Invokes the given callee |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Create a collection of name/value pairs. |
|
Create a collection of name/value pairs. |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Create a collection of name/value pairs. |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
|
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that |
Functions¶
|
Module Contents¶
- class solidity_parser.ast.solnodes.AST1Node¶
Bases:
solidity_parser.ast.nodebase.Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Stmt¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Expr¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Ident¶
Bases:
Expr
String identifier node
- text: str¶
- __str__()¶
Return str(self).
- class solidity_parser.ast.solnodes.Location¶
Bases:
enum.Enum
Solidity reference type storage locations
These are used to specify in what type of memory context/area a struct/array/mapping is stored
- MEMORY = 'memory'¶
An location that does not persist between function calls
- STORAGE = 'storage'¶
A location persists between function calls
Contract state variables are stored here also
- CALLDATA = 'calldata'¶
A location that contains the function call arguments for external function call parameters
- __str__()¶
Return str(self).
- class solidity_parser.ast.solnodes.NamedArg¶
Bases:
Expr
A name-value pair used for calling functions with options
- class solidity_parser.ast.solnodes.Unit(_: str, multiplier: int)¶
Bases:
enum.Enum
Solidity numerical unit types
- WEI = ('wei', 1)¶
- GWEI = ('gwei', 1000000000.0)¶
- SZABO = ('szabo', 1000000000000.0)¶
- FINNEY = ('finney', 1000000000000000.0)¶
- ETHER = ('ether', 1e+18)¶
- SECONDS = ('seconds', 1)¶
- MINUTES = ('minutes', 60)¶
- HOURS¶
- DAYS¶
- WEEKS¶
- YEARS¶
- _multiplier_¶
- __str__()¶
Return str(self).
- property multiplier: int¶
- class solidity_parser.ast.solnodes.Literal¶
Bases:
Expr
Constant value expression that can have an optional unit associated with it
The value may be a python primitive, e.g. an integer, boolean, string, tuple, etc
- value: Any¶
- code_str()¶
- class solidity_parser.ast.solnodes.UnaryOpCode¶
Bases:
enum.Enum
Single operand operation types
- INC = '++'¶
- DEC = '--'¶
- SIGN_POS = '+'¶
- SIGN_NEG = '-'¶
- BOOL_NEG = '!'¶
- BIT_NEG = '~'¶
- DELETE = 'delete'¶
- class solidity_parser.ast.solnodes.UnaryOp¶
Bases:
Expr
Single operand expression
- op: UnaryOpCode¶
- is_pre: bool¶
Whether the operation is pre or post, e.g. ++x or x++
- class solidity_parser.ast.solnodes.BinaryOpCode¶
Bases:
enum.Enum
Binary/two operand operation types, including assignment types
- EXPONENTIATE = '**'¶
- MUL = '*'¶
- DIV = '/'¶
- MOD = '%'¶
- ADD = '+'¶
- SUB = '-'¶
- LSHIFT = '<<'¶
- RSHIFT = '>>'¶
- BIT_AND = '&'¶
- BIT_XOR = '^'¶
- BIT_OR = '|'¶
- LT = '<'¶
- GT = '>'¶
- LTEQ = '<='¶
- GTEQ = '>='¶
- EQ = '=='¶
- NEQ = '!='¶
- BOOL_AND = '&&'¶
- BOOL_OR = '||'¶
- ASSIGN = '='¶
- ASSIGN_OR = '|='¶
- ASSIGN_BIT_NEG = '^='¶
- ASSIGN_BIT_AND = '&='¶
- ASSIGN_LSHIFT = '<<='¶
- ASSIGN_RSHIFT = '>>='¶
- ASSIGN_ADD = '+='¶
- ASSIGN_SUB = '-='¶
- ASSIGN_MUL = '*='¶
- ASSIGN_DIV = '/='¶
- ASSIGN_MOD = '%='¶
- class solidity_parser.ast.solnodes.BinaryOp¶
Bases:
Expr
Binary/two operand expression
- op: BinaryOpCode¶
- class solidity_parser.ast.solnodes.TernaryOp¶
Bases:
Expr
Choice expression that evaluates the given condition and returns one of the two given expressions
If the condition evaluates to false then the left expression is returned, otherwise the right one is
- class solidity_parser.ast.solnodes.New¶
Bases:
Expr
New object allocation expression without constructor invocation
Note that this expression only represents the ‘new X’ part of a new objects creation ‘new X(a,b)’. This expression must then be used as the base object in a constructor call to instantiate it.
- type_name: solidity_parser.ast.types.Type¶
- class solidity_parser.ast.solnodes.NewInlineArray¶
Bases:
Expr
Solidity 8 inline array creation
An inline array is one where the elements are explicitly stated in the definition, for example: ‘int[5] foo2 = [1, 0, 0, 0, 0];’
- class solidity_parser.ast.solnodes.PayableConversion¶
Bases:
Expr
Converts an address to a payable address
For example: ‘payable(address(myAddressHex))’
- class solidity_parser.ast.solnodes.GetArrayValue¶
Bases:
Expr
Gets the value at the given index from the given array
- class solidity_parser.ast.solnodes.GetArraySlice¶
Bases:
Expr
Gets a subarray at the given start and end indices from the given array
- class solidity_parser.ast.solnodes.GetMember¶
Bases:
Expr
Gets a member field or method from a given object
- class solidity_parser.ast.solnodes.CallFunction¶
Bases:
Expr
Invokes the given callee
- special_call_options: list[NamedArg]¶
See https://docs.soliditylang.org/en/v0.8.21/control-structures.html#external-function-calls
- class solidity_parser.ast.solnodes.Var¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- var_type: solidity_parser.ast.types.Type¶
- class solidity_parser.ast.solnodes.VarDecl¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- is_lhs_tuple: bool = False¶
- class solidity_parser.ast.solnodes.Parameter¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- __str__()¶
Return str(self).
- class solidity_parser.ast.solnodes.ExprStmt¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Block¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- is_unchecked: bool = False¶
- class solidity_parser.ast.solnodes.If¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Catch¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Try¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.While¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.For¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Emit¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- call: CallFunction¶
- class solidity_parser.ast.solnodes.Revert¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- call: CallFunction¶
- class solidity_parser.ast.solnodes.AssemblyStmt¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- code: str¶
- class solidity_parser.ast.solnodes.DoWhile¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Continue¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Break¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Return¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Throw¶
Bases:
Stmt
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.Modifier¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.VisibilityModifierKind¶
Bases:
enum.Enum
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- EXTERNAL = 'external'¶
- PUBLIC = 'public'¶
- INTERNAL = 'internal'¶
- PRIVATE = 'private'¶
- VIRTUAL = 'virtual'¶
- class solidity_parser.ast.solnodes.MutabilityModifierKind¶
Bases:
enum.Enum
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- PURE = 'pure'¶
- CONSTANT = 'constant'¶
- VIEW = 'view'¶
- PAYABLE = 'payable'¶
- IMMUTABLE = 'immutable'¶
- class solidity_parser.ast.solnodes.VisibilityModifier2¶
Bases:
Modifier
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- kind: VisibilityModifierKind¶
- class solidity_parser.ast.solnodes.MutabilityModifier2¶
Bases:
Modifier
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- kind: MutabilityModifierKind¶
- class solidity_parser.ast.solnodes.InvocationModifier¶
Bases:
Modifier
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.OverrideSpecifier¶
Bases:
Modifier
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- arguments: list[solidity_parser.ast.types.UserType]¶
- class solidity_parser.ast.solnodes.SourceUnit¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.PragmaDirective¶
Bases:
SourceUnit
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.ImportDirective¶
Bases:
SourceUnit
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- path: str¶
- class solidity_parser.ast.solnodes.GlobalImportDirective¶
Bases:
ImportDirective
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.UnitImportDirective¶
Bases:
ImportDirective
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.SymbolAlias¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.SymbolImportDirective¶
Bases:
ImportDirective
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- aliases: list[SymbolAlias]¶
- class solidity_parser.ast.solnodes.ContractPart¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.SpecialFunctionKind¶
Bases:
enum.Enum
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- CONSTRUCTOR = '<<constructor>>'¶
- RECEIVE = '<<receive>>'¶
- FALLBACK = '<<fallback>>'¶
- __str__()¶
Return str(self).
- class solidity_parser.ast.solnodes.FunctionDefinition¶
Bases:
SourceUnit
,ContractPart
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- name: Ident | SpecialFunctionKind¶
- class solidity_parser.ast.solnodes.ModifierDefinition¶
Bases:
ContractPart
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.StructMember¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- member_type: solidity_parser.ast.types.Type¶
- class solidity_parser.ast.solnodes.StructDefinition¶
Bases:
SourceUnit
,ContractPart
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- members: list[StructMember]¶
- class solidity_parser.ast.solnodes.EnumDefinition¶
Bases:
SourceUnit
,ContractPart
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.StateVariableDeclaration¶
Bases:
ContractPart
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- var_type: solidity_parser.ast.types.Type¶
- class solidity_parser.ast.solnodes.ConstantVariableDeclaration¶
Bases:
SourceUnit
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- var_type: solidity_parser.ast.types.Type¶
- class solidity_parser.ast.solnodes.UserValueType¶
Bases:
SourceUnit
,ContractPart
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.EventParameter¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- var_type: solidity_parser.ast.types.Type¶
- is_indexed: bool¶
- class solidity_parser.ast.solnodes.EventDefinition¶
Bases:
ContractPart
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- is_anonymous: bool¶
- parameters: list[EventParameter]¶
- class solidity_parser.ast.solnodes.ErrorParameter¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- var_type: solidity_parser.ast.types.Type¶
- class solidity_parser.ast.solnodes.ErrorDefinition¶
Bases:
SourceUnit
,ContractPart
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- parameters: list[ErrorParameter]¶
- class solidity_parser.ast.solnodes.UsingAttachment¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.UsingOperatorBinding¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- operator: UnaryOpCode | BinaryOpCode¶
- class solidity_parser.ast.solnodes.UsingDirective¶
Bases:
ContractPart
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- override_type: solidity_parser.ast.types.Type¶
- attachments_or_bindings: list[UsingAttachment | UsingOperatorBinding]¶
- is_global: bool¶
- class solidity_parser.ast.solnodes.InheritSpecifier¶
Bases:
AST1Node
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- class solidity_parser.ast.solnodes.ContractDefinition¶
Bases:
SourceUnit
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- is_abstract: bool¶
- inherits: list[InheritSpecifier]¶
- parts: list[ContractPart]¶
- class solidity_parser.ast.solnodes.InterfaceDefinition¶
Bases:
SourceUnit
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- inherits: list[InheritSpecifier]¶
- parts: list[ContractPart]¶
- class solidity_parser.ast.solnodes.LibraryDefinition¶
Bases:
SourceUnit
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- parts: list[ContractPart]¶
- class solidity_parser.ast.solnodes.CreateMetaType¶
Bases:
Expr
Base class for all AST nodes. Includes source location information, code comments and a parenting mechanism so that clients can traverse all child and parent nodes.
- base_type: solidity_parser.ast.types.Type¶
- solidity_parser.ast.solnodes.has_modifier_kind(node, *kinds: VisibilityModifierKind | MutabilityModifierKind)¶
- solidity_parser.ast.solnodes.ModFunErrEvt: TypeAlias = ModifierDefinition | FunctionDefinition | ErrorDefinition | EventDefinition¶
- solidity_parser.ast.solnodes.Types: TypeAlias = soltypes.VariableLengthArrayType | soltypes.VoidType | soltypes.IntType | soltypes.FunctionType...¶