pub struct SymbolTableCreator<'a> {
symbol_table: SymbolTable,
handler: &'a Handler,
program_name: Symbol,
is_stub: bool,
structs: IndexSet<Symbol>,
}
Fields§
§symbol_table: SymbolTable
The SymbolTable
constructed by this compiler pass.
handler: &'a Handler
The error handler.
program_name: Symbol
The current program name.
is_stub: bool
Whether or not traversing stub.
structs: IndexSet<Symbol>
The set of local structs that have been successfully visited.
Implementations§
Trait Implementations§
Source§impl ExpressionVisitor for SymbolTableCreator<'_>
impl ExpressionVisitor for SymbolTableCreator<'_>
type AdditionalInput = ()
type Output = ()
fn visit_expression( &mut self, input: &Expression, additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_access( &mut self, input: &AccessExpression, additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_array( &mut self, input: &ArrayExpression, additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_binary( &mut self, input: &BinaryExpression, additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_call( &mut self, input: &CallExpression, additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_cast( &mut self, input: &CastExpression, additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_struct_init( &mut self, input: &StructExpression, additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_err( &mut self, _input: &ErrExpression, _additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_identifier( &mut self, _input: &Identifier, _additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_literal( &mut self, _input: &Literal, _additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_locator( &mut self, _input: &LocatorExpression, _additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_ternary( &mut self, input: &TernaryExpression, additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_tuple( &mut self, input: &TupleExpression, additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_unary( &mut self, input: &UnaryExpression, additional: &Self::AdditionalInput, ) -> Self::Output
fn visit_unit( &mut self, _input: &UnitExpression, _additional: &Self::AdditionalInput, ) -> Self::Output
Source§impl<'a> Pass for SymbolTableCreator<'a>
impl<'a> Pass for SymbolTableCreator<'a>
Source§impl ProgramVisitor for SymbolTableCreator<'_>
impl ProgramVisitor for SymbolTableCreator<'_>
fn visit_program_scope(&mut self, input: &ProgramScope)
fn visit_import(&mut self, input: &Program)
fn visit_struct(&mut self, input: &Composite)
fn visit_mapping(&mut self, input: &Mapping)
fn visit_function(&mut self, input: &Function)
fn visit_stub(&mut self, input: &Stub)
fn visit_function_stub(&mut self, input: &FunctionStub)
fn visit_struct_stub(&mut self, input: &Composite)
fn visit_program(&mut self, input: &Program)
Source§impl StatementVisitor for SymbolTableCreator<'_>
impl StatementVisitor for SymbolTableCreator<'_>
fn visit_statement(&mut self, input: &Statement)
fn visit_assert(&mut self, input: &AssertStatement)
fn visit_assign(&mut self, input: &AssignStatement)
fn visit_block(&mut self, input: &Block)
fn visit_conditional(&mut self, input: &ConditionalStatement)
fn visit_console(&mut self, input: &ConsoleStatement)
fn visit_const(&mut self, input: &ConstDeclaration)
fn visit_definition(&mut self, input: &DefinitionStatement)
fn visit_expression_statement(&mut self, input: &ExpressionStatement)
fn visit_iteration(&mut self, input: &IterationStatement)
fn visit_return(&mut self, input: &ReturnStatement)
Auto Trait Implementations§
impl<'a> Freeze for SymbolTableCreator<'a>
impl<'a> !RefUnwindSafe for SymbolTableCreator<'a>
impl<'a> !Send for SymbolTableCreator<'a>
impl<'a> !Sync for SymbolTableCreator<'a>
impl<'a> Unpin for SymbolTableCreator<'a>
impl<'a> !UnwindSafe for SymbolTableCreator<'a>
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