pub struct CompilerState {
pub ast: Ast,
pub handler: Handler,
pub type_table: TypeTable,
pub node_builder: NodeBuilder,
pub assigner: Assigner,
pub symbol_table: SymbolTable,
pub struct_graph: StructGraph,
pub call_graph: CallGraph,
pub warnings: HashSet<LeoWarning>,
pub is_test: bool,
pub network: NetworkName,
}Expand description
Contains data shared by many compiler passes.
Fields§
§ast: AstThe Abstract Syntax Tree.
handler: HandlerThe error Handler.
type_table: TypeTableMaps node IDs to types.
node_builder: NodeBuilderCreates incrementing node IDs.
assigner: AssignerCreates unique symbols and definitions.
symbol_table: SymbolTableContains data about the variables and other entities in the program.
struct_graph: StructGraphA graph of which structs refer to each other.
call_graph: CallGraphA graph of which functions call each other.
warnings: HashSet<LeoWarning>A set of the warnings collected. This is used to make sure we don’t emit the same exact warning twice.
is_test: boolIs this a test program?
network: NetworkNameThe network.
Trait Implementations§
Source§impl Default for CompilerState
impl Default for CompilerState
Source§fn default() -> CompilerState
fn default() -> CompilerState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for CompilerState
impl !RefUnwindSafe for CompilerState
impl !Send for CompilerState
impl !Sync for CompilerState
impl Unpin for CompilerState
impl !UnwindSafe for CompilerState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more