pub enum ExpressionKind<'ast> {
Show 21 variants
Boolean(bool),
Call {
func: Expression<'ast>,
type_args: &'ast [TypeOrPack<'ast>],
args: &'ast [Expression<'ast>],
self_call: bool,
arg_location: Location,
},
FunctionLiteral(&'ast Function<'ast>),
Grouped(Expression<'ast>),
Integer {
value: i64,
parse_result: ConstantNumberParseResult,
},
Nil,
Number {
value: f64,
parse_result: ConstantNumberParseResult,
},
String {
value: AstString<'ast>,
quote_style: StringQuoteStyle,
},
InterpString {
strings: &'ast [AstString<'ast>],
expressions: &'ast [Expression<'ast>],
},
Table {
items: &'ast [TableItem<'ast>],
},
If {
condition: Expression<'ast>,
has_then: bool,
then_expression: Expression<'ast>,
has_else: bool,
else_expression: Expression<'ast>,
},
Varargs,
IndexExpr {
expr: Expression<'ast>,
index: Expression<'ast>,
},
IndexName {
expr: Expression<'ast>,
index: AstName<'ast>,
index_location: Location,
op_position: Position,
op: IndexNameOp,
},
TypeAssertion {
expr: Expression<'ast>,
annotation: Type<'ast>,
},
Instantiate {
expr: Expression<'ast>,
type_args: &'ast [TypeOrPack<'ast>],
},
Unary {
op: UnaryOp,
rhs: Expression<'ast>,
},
Local {
local: &'ast Local<'ast>,
upvalue: bool,
},
Global(AstName<'ast>),
Binary {
lhs: Expression<'ast>,
op: BinaryOp,
rhs: Expression<'ast>,
},
Error {
expressions: &'ast [Expression<'ast>],
message_index: usize,
},
}Variants§
Boolean(bool)
Call
FunctionLiteral(&'ast Function<'ast>)
Grouped(Expression<'ast>)
Integer
Nil
Number
String
InterpString
Table
If
Fields
§
condition: Expression<'ast>§
then_expression: Expression<'ast>§
else_expression: Expression<'ast>Varargs
IndexExpr
IndexName
TypeAssertion
Instantiate
Unary
Local
Global(AstName<'ast>)
Binary
Error
Trait Implementations§
Source§impl<'ast> Clone for ExpressionKind<'ast>
impl<'ast> Clone for ExpressionKind<'ast>
Source§fn clone(&self) -> ExpressionKind<'ast>
fn clone(&self) -> ExpressionKind<'ast>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'ast> Copy for ExpressionKind<'ast>
Source§impl<'ast> Debug for ExpressionKind<'ast>
impl<'ast> Debug for ExpressionKind<'ast>
Source§impl<'ast> PartialEq for ExpressionKind<'ast>
impl<'ast> PartialEq for ExpressionKind<'ast>
impl<'ast> StructuralPartialEq for ExpressionKind<'ast>
Auto Trait Implementations§
impl<'ast> !Send for ExpressionKind<'ast>
impl<'ast> !Sync for ExpressionKind<'ast>
impl<'ast> Freeze for ExpressionKind<'ast>
impl<'ast> RefUnwindSafe for ExpressionKind<'ast>
impl<'ast> Unpin for ExpressionKind<'ast>
impl<'ast> UnsafeUnpin for ExpressionKind<'ast>
impl<'ast> UnwindSafe for ExpressionKind<'ast>
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