Expand description
Re-exports§
- pub use self::common::*;
- pub use self::constructor::*;
- pub use common::node::*;
Modules§
Macros§
Structs§
- Annotation
- An annotation, e.g. @program.
- ArrayAccess 
- An array access expression, e.g., foo[index].
- ArrayExpression 
- An array expression, e.g., [true, false, true, false].
- ArrayType 
- An array type.
- AssertStatement 
- An assert statement, assert(<expr>),assert_eq(<expr>)orassert_neq(<expr>).
- AssignStatement 
- An assignment statement, assignee = value. Note that there is no operation associated with the assignment.
- AssociatedConstant Expression 
- An access expression to a struct constant., e.g. u8::MAX.
- AssociatedFunction Expression 
- An access expression to an associated function in a struct, e.g.Pedersen64::hash().
- Ast
- The abstract syntax tree (AST) for a Leo program.
- AsyncExpression 
- An asyncblock: e.g.async { my_mapping.set(1, 2); }.
- BinaryExpression 
- A binary expression left op rightof two operands separated by some operator. For example,foo + bar.
- Block
- A block { [stmt]* }consisting of a list of statements to execute in order.
- CallExpression 
- A function call expression, e.g.foo(args)orFoo::bar(args).
- CastExpression 
- A cast expression, e.g. 42u8 as u16.
- Composite
- A composite type definition, e.g., struct Foo { my_field: Bar }andrecord Token { owner: address, amount: u64}. In some languages these are calledstructs.
- CompositeType 
- A composite type of a identifier and external program name.
- ConditionalStatement 
- An if condition block (else next)?statement.
- ConstDeclaration 
- A constant declaration statement.
- DefinitionStatement 
- A letorconstdeclaration statement.
- ErrExpression
- Represents a syntactically invalid expression.
- ExpressionStatement 
- An expression statement, foo(a);.
- Function
- A function definition.
- FunctionStub 
- A function stub definition.
- FutureType 
- A future type consisting of the type of the inputs.
- Input
- A function parameter.
- IterationStatement 
- A bounded forloop statementfor variable in start .. =? stop block.
- Literal
- A literal.
- LocatorExpression 
- A locator that references an external resource.
- Mapping
- A mapping declaration, e.g mapping balances: address => u128.
- MappingType 
- A mapping type of a key and value type.
- Member
- A member of a structured data type, e.g foobar: u8orprivate baz: bool.
- MemberAccess 
- A struct member access expression inner.nameto some structure with named members.
- Module
- Stores the abstract syntax tree of a Leo module.
- OptionalType 
- An optional type. For example u32?whereinnerrefers tou32.
- Output
- A function output.
- Program
- Stores the Leo program abstract syntax tree.
- ProgramId 
- An identifier for a program that is eventually deployed to the network.
- ProgramScope 
- Stores the Leo program scope abstract syntax tree.
- RepeatExpression 
- An array expression constructed from one repeated element.
- ReturnStatement 
- A return statement return expression;.
- StorageVariable 
- A storage declaration, e.g storage x: u32.
- StructExpression 
- A struct initialization expression, e.g., Foo { bar: 42, baz }.
- StructVariable Initializer 
- An initializer for a single field / variable of a struct initializer expression.
That is, in Foo { bar: 42, baz }, this is eitherbar: 42, orbaz.
- Stub
- Stores the Leo stub abstract syntax tree.
- TernaryExpression 
- A ternary conditional expression, that is, condition ? if_true : if_false.
- TupleAccess 
- A tuple access expression, e.g., tuple.index.
- TupleExpression 
- A tuple expression, e.g., (foo, false, 42).
- TupleType 
- A type list of at least two types.
- UnaryExpression 
- An unary expression applying an operator to an inner expression.
- UnitExpression 
- Represents a unit expression.
- VectorType 
- A vector type.
Enums§
- AssertVariant 
- A variant of an assert statement.
- BinaryOperation 
- A binary operator.
- CoreConstant 
- A core constant that maps directly to an AVM bytecode constant.
- CoreFunction 
- A core instruction that maps directly to an AVM bytecode instruction.
- DefinitionPlace 
- Expression
- Expression that evaluates to a value.
- IntegerType 
- Explicit integer type.
- LiteralVariant 
- Mode
- The mode associated with a type.
- Statement
- Program statement that defines some action (or expression) to be carried out.
- Type
- Explicit type used for defining a variable or expression type
- UnaryOperation 
- A unary operator for a unary expression.
- Variant
- Functions are always one of six variants. A transition function is permitted the ability to manipulate records. An asynchronous transition function is a transition function that calls an asynchronous function. A regular function is not permitted to manipulate records. An asynchronous function contains on-chain operations. An inline function is directly copied at the call site.
Traits§
- AstReconstructor
- A Reconstructor trait for types in the AST.
- AstVisitor
- A Visitor trait for types in the AST.
- ConstructorConsumer 
- A Consumer trait for constructors in the AST.
- ExpressionConsumer 
- A Consumer trait for expressions in the AST.
- FromStrRadix 
- This trait allows to parse integer literals of any type generically.
- FunctionConsumer 
- A Consumer trait for functions in the AST.
- ImportConsumer 
- A Consumer trait for imported programs in the AST.
- MappingConsumer 
- A Consumer trait for mappings in the AST.
- ModuleConsumer 
- A Consumer trait for modules in the AST.
- ProgramConsumer 
- A Consumer trait for the program represented by the AST.
- ProgramReconstructor 
- A Reconstructor trait for the program represented by the AST.
- ProgramScope Consumer 
- A Consumer trait for program scopes in the AST.
- ProgramVisitor 
- A Visitor trait for the program represented by the AST.
- StatementConsumer 
- A Consumer trait for statements in the AST.
- StructConsumer 
- A Consumer trait for structs in the AST.
Functions§
- normalize_json_ value 
- Helper function to normalize AST JSON into a form compatible with tgc. This function will traverse the original JSON value and produce a new one under the following rules:
- remove_key_ from_ json 
- Helper function to recursively filter keys from AST JSON