Module ast

Module ast 

Source
Expand description

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

Re-exports§

pub use self::visit::Visit;
pub use self::visit::VisitMut;
pub use midenc_hir_type as types;

Modules§

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

Structs§

AdviceMapEntry
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.
Constant
Represents a constant definition in Miden Assembly syntax, i.e. const.FOO = 1 + 1.
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
Ident
Represents a generic identifier in Miden Assembly source code.
Import
Represents an import statement in Miden Assembly syntax.
Invoke
Represents a specific invocation
LocalNameResolver
A lookup table for procedure names 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.
PointerType
Procedure
Represents a concrete procedure definition in Miden Assembly syntax
ProcedureAlias
Represents a procedure that acts like it is locally-defined, but delegates to an externally- defined procedure.
ProcedureIndex
Represents the index of a procedure within a single module.
ProcedureName
Procedure name.
QualifiedProcedureName
Represents a qualified procedure name, e.g. std::math::u64::add, parsed into it’s constituent LibraryPath and ProcedureName components.
StructField
StructType
TypeAlias
A TypeAlias represents a named Type.
Variant
A variant of an EnumType.

Enums§

AliasTarget
A fully-qualified external procedure that is the target of a procedure 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.
ConstantExpr
Represents a constant expression or value in Miden Assembly syntax.
ConstantOp
Represents the set of binary arithmetic operators supported in Miden Assembly syntax.
DebugOptions
A proxy for miden_core::DebugOptions, but with super::Immediate values.
Export
Represents an exportable entity from a super::Module.
Form
This type represents the top-level forms of a Miden Assembly module
HashKind
Represents the type of the final value to which some string value should be converted.
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
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
ResolvedProcedure
Represents the result of resolving a ProcedureName in the context of a module.
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 a procedure globally.

Constants§

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

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