pub struct ReadableLuaGenerator { /* private fields */ }Expand description
This implementation of LuaGenerator attempts to produce Lua code as readable as possible.
Implementations§
Trait Implementations§
Source§impl Clone for ReadableLuaGenerator
impl Clone for ReadableLuaGenerator
Source§fn clone(&self) -> ReadableLuaGenerator
fn clone(&self) -> ReadableLuaGenerator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReadableLuaGenerator
impl Debug for ReadableLuaGenerator
Source§impl Default for ReadableLuaGenerator
impl Default for ReadableLuaGenerator
Source§impl LuaGenerator for ReadableLuaGenerator
impl LuaGenerator for ReadableLuaGenerator
Source§fn into_string(self) -> String
fn into_string(self) -> String
Consumes the LuaGenerator and produce a String object.
fn write_block(&mut self, block: &Block)
fn write_last_statement(&mut self, statement: &LastStatement)
fn write_assign_statement(&mut self, assign: &AssignStatement)
fn write_local_assign(&mut self, assign: &LocalAssignStatement)
fn write_compound_assign(&mut self, assign: &CompoundAssignStatement)
fn write_local_function(&mut self, function: &LocalFunctionStatement)
fn write_generic_for(&mut self, generic_for: &GenericForStatement)
fn write_numeric_for(&mut self, numeric_for: &NumericForStatement)
fn write_if_statement(&mut self, if_statement: &IfStatement)
fn write_function_statement(&mut self, function: &FunctionStatement)
fn write_do_statement(&mut self, do_statement: &DoStatement)
fn write_repeat_statement(&mut self, repeat: &RepeatStatement)
fn write_while_statement(&mut self, while_statement: &WhileStatement)
fn write_type_declaration_statement( &mut self, statement: &TypeDeclarationStatement, )
fn write_type_function_statement(&mut self, function: &TypeFunctionStatement)
fn write_false_expression(&mut self, _token: &Option<Token>)
fn write_true_expression(&mut self, _token: &Option<Token>)
fn write_nil_expression(&mut self, _token: &Option<Token>)
fn write_variable_arguments_expression(&mut self, _token: &Option<Token>)
fn write_binary_expression(&mut self, binary: &BinaryExpression)
fn write_unary_expression(&mut self, unary: &UnaryExpression)
fn write_function(&mut self, function: &FunctionExpression)
fn write_function_call(&mut self, call: &FunctionCall)
fn write_tuple_arguments(&mut self, arguments: &TupleArguments)
fn write_field(&mut self, field: &FieldExpression)
fn write_index(&mut self, index: &IndexExpression)
fn write_if_expression(&mut self, if_expression: &IfExpression)
fn write_table(&mut self, table: &TableExpression)
fn write_table_entry(&mut self, entry: &TableEntry)
fn write_number(&mut self, number: &NumberExpression)
fn write_string(&mut self, string: &StringExpression)
fn write_interpolated_string( &mut self, interpolated_string: &InterpolatedStringExpression, )
fn write_literal_table(&mut self, table: &LiteralTable)
fn write_literal_table_entry(&mut self, entry: &LiteralTableEntry)
fn write_attribute_tuple_arguments(&mut self, tuple: &AttributeTupleArguments)
fn write_identifier(&mut self, identifier: &Identifier)
fn write_parenthese(&mut self, parenthese: &ParentheseExpression)
fn write_type_cast(&mut self, type_cast: &TypeCastExpression)
fn write_type_name(&mut self, type_name: &TypeName)
fn write_type_field(&mut self, type_field: &TypeField)
fn write_true_type(&mut self, _: &Option<Token>)
fn write_false_type(&mut self, _: &Option<Token>)
fn write_nil_type(&mut self, _: &Option<Token>)
fn write_string_type(&mut self, string_type: &StringType)
fn write_array_type(&mut self, array: &ArrayType)
fn write_table_type(&mut self, table_type: &TableType)
fn write_expression_type(&mut self, expression_type: &ExpressionType)
fn write_parenthese_type(&mut self, parenthese_type: &ParentheseType)
fn write_function_type(&mut self, function_type: &FunctionType)
fn write_optional_type(&mut self, optional: &OptionalType)
fn write_intersection_type(&mut self, intersection: &IntersectionType)
fn write_union_type(&mut self, union: &UnionType)
fn write_type_pack(&mut self, type_pack: &TypePack)
fn write_variadic_type_pack(&mut self, variadic_type_pack: &VariadicTypePack)
fn write_generic_type_pack(&mut self, generic_type_pack: &GenericTypePack)
fn write_statement(&mut self, statement: &Statement)
fn write_variable(&mut self, variable: &Variable)
fn write_expression(&mut self, expression: &Expression)
fn write_literal_expression(&mut self, expression: &LiteralExpression)
fn write_attribute_arguments(&mut self, arguments: &AttributeArguments)
fn write_prefix(&mut self, prefix: &Prefix)
fn write_arguments(&mut self, arguments: &Arguments)
fn write_type(&mut self, type: &Type)
fn write_function_return_type(&mut self, return_type: &FunctionReturnType)
fn write_variadic_argument_type( &mut self, variadic_argument_type: &VariadicArgumentType, )
fn write_function_variadic_type(&mut self, variadic_type: &FunctionVariadicType)
fn write_type_parameter(&mut self, type_parameter: &TypeParameter)
fn write_generic_type_pack_default( &mut self, generic_type_pack_default: &GenericTypePackDefault, )
Auto Trait Implementations§
impl Freeze for ReadableLuaGenerator
impl RefUnwindSafe for ReadableLuaGenerator
impl Send for ReadableLuaGenerator
impl Sync for ReadableLuaGenerator
impl Unpin for ReadableLuaGenerator
impl UnsafeUnpin for ReadableLuaGenerator
impl UnwindSafe for ReadableLuaGenerator
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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