pub struct CollectGlobalsProcessor { /* private fields */ }Implementations§
Source§impl CollectGlobalsProcessor
impl CollectGlobalsProcessor
pub fn is_declared(&self, identifier: &str) -> bool
pub fn iter_globals(&self) -> impl Iterator<Item = &str>
pub fn into_globals(self) -> impl Iterator<Item = String>
Trait Implementations§
Source§impl Debug for CollectGlobalsProcessor
impl Debug for CollectGlobalsProcessor
Source§impl Default for CollectGlobalsProcessor
impl Default for CollectGlobalsProcessor
Source§fn default() -> CollectGlobalsProcessor
fn default() -> CollectGlobalsProcessor
Returns the “default value” for a type. Read more
Source§impl NodeProcessor for CollectGlobalsProcessor
impl NodeProcessor for CollectGlobalsProcessor
fn process_variable_expression(&mut self, variable: &mut Identifier)
fn process_type_field(&mut self, type_field: &mut TypeField)
fn process_block(&mut self, _: &mut Block)
fn process_scope(&mut self, _block: &mut Block, _extra: Option<&mut Expression>)
fn process_statement(&mut self, _: &mut Statement)
fn process_function_call(&mut self, _: &mut FunctionCall)
fn process_assign_statement(&mut self, _: &mut AssignStatement)
fn process_compound_assign_statement(&mut self, _: &mut CompoundAssignStatement)
fn process_do_statement(&mut self, _: &mut DoStatement)
fn process_function_statement(&mut self, _: &mut FunctionStatement)
fn process_generic_for_statement(&mut self, _: &mut GenericForStatement)
fn process_if_statement(&mut self, _: &mut IfStatement)
fn process_last_statement(&mut self, _: &mut LastStatement)
fn process_local_assign_statement(&mut self, _: &mut VariableAssignment)
fn process_local_function_statement(&mut self, _: &mut FunctionAssignment)
fn process_numeric_for_statement(&mut self, _: &mut NumericForStatement)
fn process_repeat_statement(&mut self, _: &mut RepeatStatement)
fn process_while_statement(&mut self, _: &mut WhileStatement)
fn process_type_declaration(&mut self, _: &mut TypeDeclarationStatement)
fn process_type_function(&mut self, _: &mut TypeFunctionStatement)
fn process_variable(&mut self, _: &mut Variable)
fn process_attributes(&mut self, _: &mut Attributes)
fn process_literal_table(&mut self, _: &mut LiteralTable)
fn process_literal_expression(&mut self, _: &mut LiteralExpression)
fn process_expression(&mut self, _: &mut Expression)
fn process_binary_expression(&mut self, _: &mut BinaryExpression)
fn process_field_expression(&mut self, _: &mut FieldExpression)
fn process_function_expression(&mut self, _: &mut FunctionExpression)
fn process_index_expression(&mut self, _: &mut IndexExpression)
fn process_if_expression(&mut self, _: &mut IfExpression)
fn process_number_expression(&mut self, _: &mut NumberExpression)
fn process_prefix_expression(&mut self, _: &mut Prefix)
fn process_parenthese_expression(&mut self, _: &mut ParentheseExpression)
fn process_string_expression(&mut self, _: &mut StringExpression)
fn process_interpolated_string_expression( &mut self, _: &mut InterpolatedStringExpression, )
fn process_table_expression(&mut self, _: &mut TableExpression)
fn process_unary_expression(&mut self, _: &mut UnaryExpression)
fn process_type_cast_expression(&mut self, _: &mut TypeCastExpression)
fn process_type_instantiation(&mut self, _: &mut TypeInstantiationExpression)
fn process_type(&mut self, _: &mut Type)
fn process_type_name(&mut self, _: &mut TypeName)
fn process_string_type(&mut self, _: &mut StringType)
fn process_array_type(&mut self, _: &mut ArrayType)
fn process_table_type(&mut self, _: &mut TableType)
fn process_expression_type(&mut self, _: &mut ExpressionType)
fn process_parenthese_type(&mut self, _: &mut ParentheseType)
fn process_function_type(&mut self, _: &mut FunctionType)
fn process_optional_type(&mut self, _: &mut OptionalType)
fn process_intersection_type(&mut self, _: &mut IntersectionType)
fn process_union_type(&mut self, _: &mut UnionType)
fn process_type_pack(&mut self, _: &mut TypePack)
fn process_generic_type_pack(&mut self, _: &mut GenericTypePack)
fn process_variadic_type_pack(&mut self, _: &mut VariadicTypePack)
Source§impl Scope for CollectGlobalsProcessor
impl Scope for CollectGlobalsProcessor
Source§fn pop(&mut self)
fn pop(&mut self)
When a block is left, this method should should free all identifiers inserted in the
previous block.
Source§fn insert(&mut self, identifier: &mut String)
fn insert(&mut self, identifier: &mut String)
Called when entering a function block (with each parameters of the function), with the
identifiers from a generic for statement or the identifier from a numeric for loop.
Source§fn insert_self(&mut self)
fn insert_self(&mut self)
Called when entering a function defined with a method
Source§fn insert_local(
&mut self,
identifier: &mut String,
_value: Option<&mut Expression>,
)
fn insert_local( &mut self, identifier: &mut String, _value: Option<&mut Expression>, )
Called when a new local variable is initialized.
Source§fn insert_local_function(&mut self, function: &mut FunctionAssignment)
fn insert_local_function(&mut self, function: &mut FunctionAssignment)
Called when a new local function is initialized.
Auto Trait Implementations§
impl Freeze for CollectGlobalsProcessor
impl RefUnwindSafe for CollectGlobalsProcessor
impl Send for CollectGlobalsProcessor
impl Sync for CollectGlobalsProcessor
impl Unpin for CollectGlobalsProcessor
impl UnsafeUnpin for CollectGlobalsProcessor
impl UnwindSafe for CollectGlobalsProcessor
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
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