Struct CompileError

Source
pub struct CompileError(pub String);

Tuple Fields§

§0: String

Implementations§

Source§

impl CompileError

Source

pub fn new(str: &str) -> Self

Trait Implementations§

Source§

impl AstVisitor<CompileError> for Compiler

Source§

fn error( &mut self, e: CompileError, source: &Source, ) -> Result<(), CompileError>

Source§

fn local_stat(&mut self, stat: &LocalStat) -> Result<(), CompileError>

Source§

fn assign_stat(&mut self, stat: &AssignStat) -> Result<(), CompileError>

Source§

fn stat_sep(&mut self)

Source§

fn begin_if(&mut self, _cond: &Expr) -> Result<bool, E>

Source§

fn then(&mut self, _block: &Block) -> Result<bool, E>

Source§

fn begin_else_if(&mut self, _cond: &Expr) -> Result<bool, E>

Source§

fn begin_else(&mut self, _block: &Block) -> Result<bool, E>

Source§

fn end_if(&mut self)

Source§

fn begin_while(&mut self, _cond: &Expr) -> Result<bool, E>

Source§

fn begin_while_block(&mut self, _block: &Block) -> Result<bool, E>

Source§

fn end_while(&mut self)

Source§

fn begin_do_block(&mut self, _block: &Block) -> Result<bool, E>

Source§

fn end_do_block(&mut self)

Source§

fn for_num(&mut self, _fornum: &ForNum) -> Result<bool, E>

Source§

fn for_list(&mut self, _forlist: &ForList) -> Result<bool, E>

Source§

fn begin_for_block(&mut self, _block: &Block) -> Result<bool, E>

Source§

fn end_for(&mut self)

Source§

fn begin_repeat(&mut self, _block: &Block) -> Result<bool, E>

Source§

fn until(&mut self)

Source§

fn end_repeat(&mut self)

Source§

fn func(&mut self, _funcstat: &FuncStat)

Source§

fn label_stat(&mut self, _stat: &LabelStat) -> Result<(), E>

Source§

fn ret_stat(&mut self, _stat: &RetStat) -> Result<(), E>

Source§

fn break_stat(&mut self, _stat: &BreakStat) -> Result<(), E>

Source§

fn goto_stat(&mut self, _stat: &GotoStat) -> Result<(), E>

Source§

fn call_stat(&mut self, _stat: &CallStat) -> Result<(), E>

Source§

fn expr(&mut self, _stat: &Expr) -> Result<bool, E>

Source§

fn expr_sep(&mut self)

Source§

fn nil(&mut self)

Source§

fn true_(&mut self)

Source§

fn false_(&mut self)

Source§

fn float(&mut self, _f: FloatType)

Source§

fn int(&mut self, _i: IntType)

Source§

fn string(&mut self, _s: &str)

Source§

fn vararg(&mut self)

Source§

fn anonymous_func(&mut self)

Source§

fn begin_func_body(&mut self, _body: &FuncBody) -> Result<bool, E>

Source§

fn end_func_body(&mut self)

Source§

fn begin_table(&mut self, _t: &Table) -> Result<bool, E>

Source§

fn end_table(&mut self, _t: &Table)

Source§

fn field_sep(&mut self)

Source§

fn begin_rec_field(&mut self, _field: &RecField) -> Result<bool, E>

Source§

fn field_kv_sep(&mut self)

Source§

fn begin_field_key(&mut self, _key: &FieldKey) -> Result<bool, E>

Source§

fn end_field_key(&mut self, _key: &FieldKey)

Source§

fn end_rec_field(&mut self)

Source§

fn begin_bin_expr(&mut self, _expr: &BinExpr) -> Result<bool, E>

Source§

fn binop(&mut self, _op: BinOp)

Source§

fn end_bin_expr(&mut self)

Source§

fn begin_un_expr(&mut self, _expr: &UnExpr) -> Result<bool, E>

Source§

fn unop(&mut self, _op: UnOp)

Source§

fn end_un_expr(&mut self)

Source§

fn begin_suffixed_expr(&mut self, _expr: &SuffixedExpr) -> Result<bool, E>

Source§

fn end_suffixed_expr(&mut self)

Source§

fn name(&mut self, _name: &str)

Source§

fn attr(&mut self, _attr: &str)

Source§

fn method(&mut self, _method: &str)

Source§

fn begin_index(&mut self, _expr: &Expr) -> Result<bool, E>

Source§

fn end_index(&mut self)

Source§

fn begin_func_args(&mut self, _args: &FuncArgs) -> Result<bool, E>

Source§

fn end_func_args(&mut self)

Source§

fn begin_paren_expr(&mut self, _expr: &Expr) -> Result<bool, E>

Source§

fn end_paren_expr(&mut self)

Source§

fn suffix(&mut self, _suf: &Suffix) -> Result<bool, E>

Source§

fn comment(&mut self, _comment: &CommentStat)

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