ConvertBit32

Struct ConvertBit32 

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

Trait Implementations§

Source§

impl Debug for ConvertBit32

Source§

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

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

impl Default for ConvertBit32

Source§

fn default() -> Self

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

impl VisitorMut for ConvertBit32

Source§

fn visit_expression(&mut self, exp: Expression) -> Expression

To convert bit32 methods/calls and linked identifiers into bitwise operators

Conversion Example: local x = bit32.band; local y = x(1, 2) -> do then; local y = ((1&2)&0xFFFFFFFF)

Source§

fn visit_stmt(&mut self, stmt: Stmt) -> Stmt

Source§

fn visit_ast(&mut self, ast: Ast) -> Ast
where Self: Sized,

Visit the nodes of an Ast
Source§

fn visit_anonymous_call(&mut self, node: FunctionArgs) -> FunctionArgs

Source§

fn visit_anonymous_call_end(&mut self, node: FunctionArgs) -> FunctionArgs

Source§

fn visit_assignment(&mut self, node: Assignment) -> Assignment

Source§

fn visit_assignment_end(&mut self, node: Assignment) -> Assignment

Source§

fn visit_block(&mut self, node: Block) -> Block

Source§

fn visit_block_end(&mut self, node: Block) -> Block

Source§

fn visit_call(&mut self, node: Call) -> Call

Source§

fn visit_call_end(&mut self, node: Call) -> Call

Source§

fn visit_contained_span(&mut self, node: ContainedSpan) -> ContainedSpan

Source§

fn visit_contained_span_end(&mut self, node: ContainedSpan) -> ContainedSpan

Source§

fn visit_do(&mut self, node: Do) -> Do

Source§

fn visit_do_end(&mut self, node: Do) -> Do

Source§

fn visit_else_if(&mut self, node: ElseIf) -> ElseIf

Source§

fn visit_else_if_end(&mut self, node: ElseIf) -> ElseIf

Source§

fn visit_eof(&mut self, node: TokenReference) -> TokenReference

Source§

fn visit_eof_end(&mut self, node: TokenReference) -> TokenReference

Source§

fn visit_expression_end(&mut self, node: Expression) -> Expression

Source§

fn visit_field(&mut self, node: Field) -> Field

Source§

fn visit_field_end(&mut self, node: Field) -> Field

Source§

fn visit_function_args(&mut self, node: FunctionArgs) -> FunctionArgs

Source§

fn visit_function_args_end(&mut self, node: FunctionArgs) -> FunctionArgs

Source§

fn visit_function_body(&mut self, node: FunctionBody) -> FunctionBody

Source§

fn visit_function_body_end(&mut self, node: FunctionBody) -> FunctionBody

Source§

fn visit_function_call(&mut self, node: FunctionCall) -> FunctionCall

Source§

fn visit_function_call_end(&mut self, node: FunctionCall) -> FunctionCall

Source§

fn visit_function_declaration( &mut self, node: FunctionDeclaration, ) -> FunctionDeclaration

Source§

fn visit_function_declaration_end( &mut self, node: FunctionDeclaration, ) -> FunctionDeclaration

Source§

fn visit_function_name(&mut self, node: FunctionName) -> FunctionName

Source§

fn visit_function_name_end(&mut self, node: FunctionName) -> FunctionName

Source§

fn visit_generic_for(&mut self, node: GenericFor) -> GenericFor

Source§

fn visit_generic_for_end(&mut self, node: GenericFor) -> GenericFor

Source§

fn visit_if(&mut self, node: If) -> If

Source§

fn visit_if_end(&mut self, node: If) -> If

Source§

fn visit_index(&mut self, node: Index) -> Index

Source§

fn visit_index_end(&mut self, node: Index) -> Index

Source§

fn visit_local_assignment(&mut self, node: LocalAssignment) -> LocalAssignment

Source§

fn visit_local_assignment_end( &mut self, node: LocalAssignment, ) -> LocalAssignment

Source§

fn visit_local_function(&mut self, node: LocalFunction) -> LocalFunction

Source§

fn visit_local_function_end(&mut self, node: LocalFunction) -> LocalFunction

Source§

fn visit_last_stmt(&mut self, node: LastStmt) -> LastStmt

Source§

fn visit_last_stmt_end(&mut self, node: LastStmt) -> LastStmt

Source§

fn visit_method_call(&mut self, node: MethodCall) -> MethodCall

Source§

fn visit_method_call_end(&mut self, node: MethodCall) -> MethodCall

Source§

fn visit_numeric_for(&mut self, node: NumericFor) -> NumericFor

Source§

fn visit_numeric_for_end(&mut self, node: NumericFor) -> NumericFor

Source§

fn visit_parameter(&mut self, node: Parameter) -> Parameter

Source§

fn visit_parameter_end(&mut self, node: Parameter) -> Parameter

Source§

fn visit_prefix(&mut self, node: Prefix) -> Prefix

Source§

fn visit_prefix_end(&mut self, node: Prefix) -> Prefix

Source§

fn visit_return(&mut self, node: Return) -> Return

Source§

fn visit_return_end(&mut self, node: Return) -> Return

Source§

fn visit_repeat(&mut self, node: Repeat) -> Repeat

Source§

fn visit_repeat_end(&mut self, node: Repeat) -> Repeat

Source§

fn visit_stmt_end(&mut self, node: Stmt) -> Stmt

Source§

fn visit_suffix(&mut self, node: Suffix) -> Suffix

Source§

fn visit_suffix_end(&mut self, node: Suffix) -> Suffix

Source§

fn visit_table_constructor( &mut self, node: TableConstructor, ) -> TableConstructor

Source§

fn visit_table_constructor_end( &mut self, node: TableConstructor, ) -> TableConstructor

Source§

fn visit_token_reference(&mut self, node: TokenReference) -> TokenReference

Source§

fn visit_token_reference_end(&mut self, node: TokenReference) -> TokenReference

Source§

fn visit_un_op(&mut self, node: UnOp) -> UnOp

Source§

fn visit_un_op_end(&mut self, node: UnOp) -> UnOp

Source§

fn visit_var(&mut self, node: Var) -> Var

Source§

fn visit_var_end(&mut self, node: Var) -> Var

Source§

fn visit_var_expression(&mut self, node: VarExpression) -> VarExpression

Source§

fn visit_var_expression_end(&mut self, node: VarExpression) -> VarExpression

Source§

fn visit_while(&mut self, node: While) -> While

Source§

fn visit_while_end(&mut self, node: While) -> While

Source§

fn visit_compound_assignment( &mut self, node: CompoundAssignment, ) -> CompoundAssignment

Source§

fn visit_compound_assignment_end( &mut self, node: CompoundAssignment, ) -> CompoundAssignment

Source§

fn visit_compound_op(&mut self, node: CompoundOp) -> CompoundOp

Source§

fn visit_compound_op_end(&mut self, node: CompoundOp) -> CompoundOp

Source§

fn visit_else_if_expression( &mut self, node: ElseIfExpression, ) -> ElseIfExpression

Source§

fn visit_else_if_expression_end( &mut self, node: ElseIfExpression, ) -> ElseIfExpression

Source§

fn visit_exported_type_declaration( &mut self, node: ExportedTypeDeclaration, ) -> ExportedTypeDeclaration

Source§

fn visit_exported_type_declaration_end( &mut self, node: ExportedTypeDeclaration, ) -> ExportedTypeDeclaration

Source§

fn visit_exported_type_function( &mut self, node: ExportedTypeFunction, ) -> ExportedTypeFunction

Source§

fn visit_exported_type_function_end( &mut self, node: ExportedTypeFunction, ) -> ExportedTypeFunction

Source§

fn visit_generic_declaration( &mut self, node: GenericDeclaration, ) -> GenericDeclaration

Source§

fn visit_generic_declaration_end( &mut self, node: GenericDeclaration, ) -> GenericDeclaration

Source§

fn visit_generic_declaration_parameter( &mut self, node: GenericDeclarationParameter, ) -> GenericDeclarationParameter

Source§

fn visit_generic_declaration_parameter_end( &mut self, node: GenericDeclarationParameter, ) -> GenericDeclarationParameter

Source§

fn visit_generic_parameter_info( &mut self, node: GenericParameterInfo, ) -> GenericParameterInfo

Source§

fn visit_generic_parameter_info_end( &mut self, node: GenericParameterInfo, ) -> GenericParameterInfo

Source§

fn visit_if_expression(&mut self, node: IfExpression) -> IfExpression

Source§

fn visit_if_expression_end(&mut self, node: IfExpression) -> IfExpression

Source§

fn visit_indexed_type_info(&mut self, node: IndexedTypeInfo) -> IndexedTypeInfo

Source§

fn visit_indexed_type_info_end( &mut self, node: IndexedTypeInfo, ) -> IndexedTypeInfo

Source§

fn visit_interpolated_string( &mut self, node: InterpolatedString, ) -> InterpolatedString

Source§

fn visit_interpolated_string_end( &mut self, node: InterpolatedString, ) -> InterpolatedString

Source§

fn visit_type_argument(&mut self, node: TypeArgument) -> TypeArgument

Source§

fn visit_type_argument_end(&mut self, node: TypeArgument) -> TypeArgument

Source§

fn visit_type_assertion(&mut self, node: TypeAssertion) -> TypeAssertion

Source§

fn visit_type_assertion_end(&mut self, node: TypeAssertion) -> TypeAssertion

Source§

fn visit_type_declaration(&mut self, node: TypeDeclaration) -> TypeDeclaration

Source§

fn visit_type_declaration_end( &mut self, node: TypeDeclaration, ) -> TypeDeclaration

Source§

fn visit_type_field(&mut self, node: TypeField) -> TypeField

Source§

fn visit_type_field_end(&mut self, node: TypeField) -> TypeField

Source§

fn visit_type_field_key(&mut self, node: TypeFieldKey) -> TypeFieldKey

Source§

fn visit_type_field_key_end(&mut self, node: TypeFieldKey) -> TypeFieldKey

Source§

fn visit_type_function(&mut self, node: TypeFunction) -> TypeFunction

Source§

fn visit_type_function_end(&mut self, node: TypeFunction) -> TypeFunction

Source§

fn visit_type_info(&mut self, node: TypeInfo) -> TypeInfo

Source§

fn visit_type_info_end(&mut self, node: TypeInfo) -> TypeInfo

Source§

fn visit_type_intersection( &mut self, node: TypeIntersection, ) -> TypeIntersection

Source§

fn visit_type_intersection_end( &mut self, node: TypeIntersection, ) -> TypeIntersection

Source§

fn visit_type_specifier(&mut self, node: TypeSpecifier) -> TypeSpecifier

Source§

fn visit_type_specifier_end(&mut self, node: TypeSpecifier) -> TypeSpecifier

Source§

fn visit_type_union(&mut self, node: TypeUnion) -> TypeUnion

Source§

fn visit_type_union_end(&mut self, node: TypeUnion) -> TypeUnion

Source§

fn visit_goto(&mut self, node: Goto) -> Goto

Source§

fn visit_goto_end(&mut self, node: Goto) -> Goto

Source§

fn visit_label(&mut self, node: Label) -> Label

Source§

fn visit_label_end(&mut self, node: Label) -> Label

Source§

fn visit_identifier(&mut self, token: Token) -> Token

Source§

fn visit_multi_line_comment(&mut self, token: Token) -> Token

Source§

fn visit_number(&mut self, token: Token) -> Token

Source§

fn visit_single_line_comment(&mut self, token: Token) -> Token

Source§

fn visit_string_literal(&mut self, token: Token) -> Token

Source§

fn visit_symbol(&mut self, token: Token) -> Token

Source§

fn visit_token(&mut self, token: Token) -> Token

Source§

fn visit_whitespace(&mut self, token: Token) -> Token

Source§

fn visit_interpolated_string_segment(&mut self, token: Token) -> Token

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<I, T> ExtractContext<I, ()> for T

Source§

fn extract_context(self, _original_input: I)

Given the context attached to a nom error, and given the original input to the nom parser, extract more the useful context information. 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<I> RecreateContext<I> for I

Source§

fn recreate_context(_original_input: I, tail: I) -> I

Given the original input, as well as the context reported by nom, recreate a context in the original string where the error occurred. 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.
Source§

impl<T> VisitorMutWrapper for T
where T: VisitorMut,

Source§

fn visit_ast_boxed(&mut self, ast: Ast) -> Ast

Source§

impl<T> ErasedDestructor for T
where T: 'static,