Skip to main content

CollectGlobalsProcessor

Struct CollectGlobalsProcessor 

Source
pub struct CollectGlobalsProcessor { /* private fields */ }

Implementations§

Source§

impl CollectGlobalsProcessor

Source

pub fn is_declared(&self, identifier: &str) -> bool

Source

pub fn iter_globals(&self) -> impl Iterator<Item = &str>

Source

pub fn into_globals(self) -> impl Iterator<Item = String>

Trait Implementations§

Source§

impl Debug for CollectGlobalsProcessor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CollectGlobalsProcessor

Source§

fn default() -> CollectGlobalsProcessor

Returns the “default value” for a type. Read more
Source§

impl NodeProcessor for CollectGlobalsProcessor

Source§

fn process_variable_expression(&mut self, variable: &mut Identifier)

Source§

fn process_type_field(&mut self, type_field: &mut TypeField)

Source§

fn process_block(&mut self, _: &mut Block)

Source§

fn process_scope(&mut self, _block: &mut Block, _extra: Option<&mut Expression>)

Source§

fn process_statement(&mut self, _: &mut Statement)

Source§

fn process_function_call(&mut self, _: &mut FunctionCall)

Source§

fn process_assign_statement(&mut self, _: &mut AssignStatement)

Source§

fn process_compound_assign_statement(&mut self, _: &mut CompoundAssignStatement)

Source§

fn process_do_statement(&mut self, _: &mut DoStatement)

Source§

fn process_function_statement(&mut self, _: &mut FunctionStatement)

Source§

fn process_generic_for_statement(&mut self, _: &mut GenericForStatement)

Source§

fn process_if_statement(&mut self, _: &mut IfStatement)

Source§

fn process_last_statement(&mut self, _: &mut LastStatement)

Source§

fn process_local_assign_statement(&mut self, _: &mut VariableAssignment)

Source§

fn process_local_function_statement(&mut self, _: &mut FunctionAssignment)

Source§

fn process_numeric_for_statement(&mut self, _: &mut NumericForStatement)

Source§

fn process_repeat_statement(&mut self, _: &mut RepeatStatement)

Source§

fn process_while_statement(&mut self, _: &mut WhileStatement)

Source§

fn process_type_declaration(&mut self, _: &mut TypeDeclarationStatement)

Source§

fn process_type_function(&mut self, _: &mut TypeFunctionStatement)

Source§

fn process_variable(&mut self, _: &mut Variable)

Source§

fn process_attributes(&mut self, _: &mut Attributes)

Source§

fn process_literal_table(&mut self, _: &mut LiteralTable)

Source§

fn process_literal_expression(&mut self, _: &mut LiteralExpression)

Source§

fn process_expression(&mut self, _: &mut Expression)

Source§

fn process_binary_expression(&mut self, _: &mut BinaryExpression)

Source§

fn process_field_expression(&mut self, _: &mut FieldExpression)

Source§

fn process_function_expression(&mut self, _: &mut FunctionExpression)

Source§

fn process_index_expression(&mut self, _: &mut IndexExpression)

Source§

fn process_if_expression(&mut self, _: &mut IfExpression)

Source§

fn process_number_expression(&mut self, _: &mut NumberExpression)

Source§

fn process_prefix_expression(&mut self, _: &mut Prefix)

Source§

fn process_parenthese_expression(&mut self, _: &mut ParentheseExpression)

Source§

fn process_string_expression(&mut self, _: &mut StringExpression)

Source§

fn process_interpolated_string_expression( &mut self, _: &mut InterpolatedStringExpression, )

Source§

fn process_table_expression(&mut self, _: &mut TableExpression)

Source§

fn process_unary_expression(&mut self, _: &mut UnaryExpression)

Source§

fn process_type_cast_expression(&mut self, _: &mut TypeCastExpression)

Source§

fn process_type_instantiation(&mut self, _: &mut TypeInstantiationExpression)

Source§

fn process_type(&mut self, _: &mut Type)

Source§

fn process_type_name(&mut self, _: &mut TypeName)

Source§

fn process_string_type(&mut self, _: &mut StringType)

Source§

fn process_array_type(&mut self, _: &mut ArrayType)

Source§

fn process_table_type(&mut self, _: &mut TableType)

Source§

fn process_expression_type(&mut self, _: &mut ExpressionType)

Source§

fn process_parenthese_type(&mut self, _: &mut ParentheseType)

Source§

fn process_function_type(&mut self, _: &mut FunctionType)

Source§

fn process_optional_type(&mut self, _: &mut OptionalType)

Source§

fn process_intersection_type(&mut self, _: &mut IntersectionType)

Source§

fn process_union_type(&mut self, _: &mut UnionType)

Source§

fn process_type_pack(&mut self, _: &mut TypePack)

Source§

fn process_generic_type_pack(&mut self, _: &mut GenericTypePack)

Source§

fn process_variadic_type_pack(&mut self, _: &mut VariadicTypePack)

Source§

impl Scope for CollectGlobalsProcessor

Source§

fn push(&mut self)

This method is called when a new block is entered.
Source§

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)

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)

Called when entering a function defined with a method
Source§

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)

Called when a new local function is initialized.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.