Struct leo_compiler::Compiler

source ·
pub struct Compiler<'a> {
    pub program_name: String,
    pub network: String,
    pub ast: Ast,
    pub input_ast: Option<InputAst>,
    /* private fields */
}
Expand description

The primary entry point of the Leo compiler.

Fields

program_name: String

The program name,

network: String

The network name,

ast: Ast

The AST for the program.

input_ast: Option<InputAst>

The input ast for the program if it exists.

Implementations

Returns a new Leo compiler.

Returns a SHA256 checksum of the program file.

Parses and stores a program file content from a string, constructs a syntax tree, and generates a program.

Parses and stores the main program file, constructs a syntax tree, and generates a program.

Parses and stores the input file, constructs a syntax tree, and generates a program input.

Runs the symbol table pass.

Runs the type checker pass.

Runs the loop unrolling pass.

Runs the static single assignment pass.

Runs the flattening pass.

Runs the compiler stages.

Returns a compiled Leo program and prints the resulting bytecode.

Returns a compiled Leo program.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.