Module ast

Module ast 

Source
Expand description

Abstract syntax tree (AST) components of Miden programs, modules, and procedures.

Re-exports§

pub use self::constants::Constant;
pub use self::constants::ConstantExpr;
pub use self::constants::ConstantOp;
pub use self::constants::ConstantValue;
pub use self::constants::HashKind;
pub use self::path::Path;
pub use self::path::PathBuf;
pub use self::path::PathComponent;
pub use self::path::PathError;
pub use self::visit::Visit;
pub use self::visit::VisitMut;
pub use midenc_hir_type as types;

Modules§

constants
path
visit
This module provides an implementation of the visitor pattern for the AST of Miden Assembly.

Structs§

AdviceMapEntry
Alias
Represents an item that acts like it is locally-defined, but is actually externally-defined.
ArrayType
AttributeSet
An AttributeSet provides storage and access to all of the attributes attached to a Miden Assembly item, e.g. procedure definition.
Block
Represents a basic block in Miden Assembly syntax.
DocString
Represents a documentation string in Miden Assembly
EnumType
A combined type alias and constant declaration corresponding to a C-like enumeration.
FunctionType
A procedure type signature
GlobalItemIndex
Uniquely identifies an item in a set of crate::ast::Module
Ident
Represents a generic identifier in Miden Assembly source code.
Invoke
Represents a specific invocation
ItemIndex
Represents the index of an item within its respective storage vector in some module
LocalSymbolResolver
A resolver for symbol references in the context of some module.
MetaKeyValue
Represents the metadata of a key-value crate::ast::Attribute, i.e. @props(key = value)
MetaList
Represents the metadata of a named list crate::ast::Attribute, i.e. @name(item0, .., itemN)
Module
The abstract syntax tree for a single Miden Assembly module.
ModuleIndex
A strongly-typed index into a set of crate::ast::Module
PointerType
Procedure
Represents a concrete procedure definition in Miden Assembly syntax
ProcedureName
Procedure name.
QualifiedProcedureName
Represents a qualified procedure name, e.g. std::math::u64::add, parsed into it’s constituent Path and ProcedureName components.
StructField
StructType
TypeAlias
A TypeAlias represents a named Type.
Variant
A variant of an EnumType.

Enums§

AliasTarget
A fully-qualified external item that is the target of an alias
Attribute
An Attribute represents some named metadata attached to a Miden Assembly procedure.
AttributeSetEntry
Represents an entry under a specific key in a AttributeSet
BorrowedMeta
Represents a reference to the metadata for an super::Attribute
CaseKindError
Represents the various types of casing errors that can occur, e.g. using an identifier with SCREAMING_CASE where one with snake_case is expected.
DebugOptions
A proxy for miden_core::DebugOptions, but with super::Immediate values.
Export
Represents an exportable item from a crate::ast::Module.
Form
This type represents the top-level forms of a Miden Assembly module
IdentError
Represents the types of errors that can occur when parsing/validating an Ident
Immediate
Represents an instruction immediate, e.g. add.1 or add.CONST
Instruction
Represents the set of primitive instructions in Miden Assembly syntax.
InvocationTarget
Describes targets of exec, call, and syscall instructions.
InvokeKind
Represents the kind of an invocation
LocalSymbol
Represents a symbol within the context of a single module
Meta
Represents the metadata provided as arguments to an attribute.
MetaExpr
Represents a metadata expression of an crate::ast::Attribute
MetaItem
Represents a single metadata item provided as an argument to an attribute.
ModuleKind
Represents the kind of a Module.
Op
Represents the Miden Assembly instruction set syntax
SymbolResolution
Represents the result of resolving a symbol
SymbolResolutionError
Represents an error that occurs during symbol resolution
SystemEventNode
Instructions which inject data into the advice provider.
TypeDecl
An abstraction over the different types of type declarations allowed in Miden Assembly
TypeExpr
A syntax-level type expression (i.e. primitive type, reference to nominal type, etc.)
Visibility
Represents the visibility of an item (procedure, constant, etc.) globally.

Constants§

MAX_STACK_WORD_OFFSET
Maximum stack index at which a full word can start.

Traits§

SymbolTable
This trait abstracts over any type which acts as a symbol table, e.g. a crate::ast::Module.
TypeResolver
Abstracts over resolving an item to a concrete Type, using one of:

Type Aliases§

ErrorMsg
The type of error messages used in MASM assertions.
ImmFelt
A field element immediate
ImmU8
An 8-bit unsigned immediate
ImmU16
A 16-bit unsigned immediate
ImmU32
A 32-bit unsigned immediate