pub enum Expression<'a> {
Show 13 variants
Nil,
False,
True,
Numeral(Numeral<'a>),
LiteralString(LiteralString<'a>),
Name(Name<'a>),
VarArgs,
FunctionDef(FuncBody<'a>),
TableCtor(Box<Table<'a>>),
BinOp {
left: Box<Expression<'a>>,
op: BinaryOperator,
right: Box<Expression<'a>>,
},
UnaryOp {
op: UnaryOperator,
exp: Box<Expression<'a>>,
},
FuncCall(FunctionCall<'a>),
Suffixed(Box<Suffixed<'a>>),
}Variants§
Nil
False
True
Numeral(Numeral<'a>)
LiteralString(LiteralString<'a>)
Name(Name<'a>)
VarArgs
FunctionDef(FuncBody<'a>)
TableCtor(Box<Table<'a>>)
BinOp
UnaryOp
FuncCall(FunctionCall<'a>)
Suffixed(Box<Suffixed<'a>>)
Implementations§
Source§impl<'a> Expression<'a>
impl<'a> Expression<'a>
pub fn string(s: &'a str) -> Self
pub fn func_call(subject: Expression<'a>, args: Args<'a>) -> Self
pub fn method_call(subject: Expression<'a>, args: Args<'a>) -> Self
pub fn binary( left: Expression<'a>, op: BinaryOperator, right: Expression<'a>, ) -> Self
pub fn unary(op: UnaryOperator, exp: Expression<'a>) -> Self
pub fn name_from(s: &'a str) -> Self
pub fn numeral_from(s: &'a str) -> Self
Trait Implementations§
Source§impl<'a> Debug for Expression<'a>
impl<'a> Debug for Expression<'a>
Source§impl<'a> PartialEq for Expression<'a>
impl<'a> PartialEq for Expression<'a>
impl<'a> StructuralPartialEq for Expression<'a>
Auto Trait Implementations§
impl<'a> Freeze for Expression<'a>
impl<'a> RefUnwindSafe for Expression<'a>
impl<'a> Send for Expression<'a>
impl<'a> Sync for Expression<'a>
impl<'a> Unpin for Expression<'a>
impl<'a> UnwindSafe for Expression<'a>
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