pub struct DenseLuaGenerator { /* private fields */ }
Expand description

This implementation of LuaGenerator attempts to produce Lua code as small as possible. It is not meant to be read by humans.

Implementations§

source§

impl DenseLuaGenerator

source

pub fn new(column_span: usize) -> Self

Creates a generator that will wrap the code on a new line after the amount of characters given by the column_span argument.

source

pub fn into_string(self) -> String

Consumes the LuaGenerator and produce a String object.

Trait Implementations§

source§

impl Clone for DenseLuaGenerator

source§

fn clone(&self) -> DenseLuaGenerator

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for DenseLuaGenerator

source§

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

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

impl Default for DenseLuaGenerator

source§

fn default() -> Self

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

impl LuaGenerator for DenseLuaGenerator

source§

fn into_string(self) -> String

Consumes the LuaGenerator and produce a String object.

source§

fn write_block(&mut self, block: &Block)

source§

fn write_assign_statement(&mut self, assign: &AssignStatement)

source§

fn write_do_statement(&mut self, do_statement: &DoStatement)

source§

fn write_generic_for(&mut self, generic_for: &GenericForStatement)

source§

fn write_if_statement(&mut self, if_statement: &IfStatement)

source§

fn write_function_statement(&mut self, function: &FunctionStatement)

source§

fn write_last_statement(&mut self, statement: &LastStatement)

source§

fn write_local_assign(&mut self, assign: &LocalAssignStatement)

source§

fn write_compound_assign(&mut self, assign: &CompoundAssignStatement)

source§

fn write_local_function(&mut self, function: &LocalFunctionStatement)

source§

fn write_numeric_for(&mut self, numeric_for: &NumericForStatement)

source§

fn write_repeat_statement(&mut self, repeat: &RepeatStatement)

source§

fn write_while_statement(&mut self, while_statement: &WhileStatement)

source§

fn write_expression(&mut self, expression: &Expression)

source§

fn write_binary_expression(&mut self, binary: &BinaryExpression)

source§

fn write_unary_expression(&mut self, unary: &UnaryExpression)

source§

fn write_function(&mut self, function: &FunctionExpression)

source§

fn write_function_call(&mut self, call: &FunctionCall)

source§

fn write_field(&mut self, field: &FieldExpression)

source§

fn write_index(&mut self, index: &IndexExpression)

source§

fn write_if_expression(&mut self, if_expression: &IfExpression)

source§

fn write_table(&mut self, table: &TableExpression)

source§

fn write_table_entry(&mut self, entry: &TableEntry)

source§

fn write_number(&mut self, number: &NumberExpression)

source§

fn write_tuple_arguments(&mut self, arguments: &TupleArguments)

source§

fn write_string(&mut self, string: &StringExpression)

source§

fn write_identifier(&mut self, identifier: &Identifier)

source§

fn write_parenthese(&mut self, parenthese: &ParentheseExpression)

source§

fn write_statement(&mut self, statement: &Statement)

source§

fn write_variable(&mut self, variable: &Variable)

source§

fn write_prefix(&mut self, prefix: &Prefix)

source§

fn write_arguments(&mut self, arguments: &Arguments)

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<I, T> ExtractContext<I, ()> for T

§

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 Twhere 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.

§

impl<I> RecreateContext<I> for I

§

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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.