pub enum Expression {
Show 18 variants
Binary(Box<BinaryExpression>),
Call(Box<FunctionCall>),
False(Option<Token>),
Field(Box<FieldExpression>),
Function(FunctionExpression),
Identifier(Identifier),
If(Box<IfExpression>),
Index(Box<IndexExpression>),
Nil(Option<Token>),
Number(NumberExpression),
Parenthese(Box<ParentheseExpression>),
String(StringExpression),
InterpolatedString(InterpolatedStringExpression),
Table(TableExpression),
True(Option<Token>),
Unary(Box<UnaryExpression>),
VariableArguments(Option<Token>),
TypeCast(TypeCastExpression),
}
Variants§
Binary(Box<BinaryExpression>)
Call(Box<FunctionCall>)
False(Option<Token>)
Field(Box<FieldExpression>)
Function(FunctionExpression)
Identifier(Identifier)
If(Box<IfExpression>)
Index(Box<IndexExpression>)
Nil(Option<Token>)
Number(NumberExpression)
Parenthese(Box<ParentheseExpression>)
String(StringExpression)
InterpolatedString(InterpolatedStringExpression)
Table(TableExpression)
True(Option<Token>)
Unary(Box<UnaryExpression>)
VariableArguments(Option<Token>)
TypeCast(TypeCastExpression)
Implementations§
Source§impl Expression
impl Expression
pub fn nil() -> Self
pub fn variable_arguments() -> Self
pub fn identifier<S: Into<Identifier>>(identifier: S) -> Self
pub fn in_parentheses(self) -> Self
Trait Implementations§
Source§impl Clone for Expression
impl Clone for Expression
Source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a copy 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 Expression
impl Debug for Expression
Source§impl From<BinaryExpression> for Expression
impl From<BinaryExpression> for Expression
Source§fn from(binary: BinaryExpression) -> Expression
fn from(binary: BinaryExpression) -> Expression
Converts to this type from the input type.
Source§impl From<BinaryNumber> for Expression
impl From<BinaryNumber> for Expression
Source§fn from(number: BinaryNumber) -> Self
fn from(number: BinaryNumber) -> Self
Converts to this type from the input type.
Source§impl From<DecimalNumber> for Expression
impl From<DecimalNumber> for Expression
Source§fn from(number: DecimalNumber) -> Self
fn from(number: DecimalNumber) -> Self
Converts to this type from the input type.
Source§impl From<Expression> for Prefix
impl From<Expression> for Prefix
Source§fn from(expression: Expression) -> Self
fn from(expression: Expression) -> Self
Converts to this type from the input type.
Source§impl From<FieldExpression> for Expression
impl From<FieldExpression> for Expression
Source§fn from(field: FieldExpression) -> Expression
fn from(field: FieldExpression) -> Expression
Converts to this type from the input type.
Source§impl From<FunctionCall> for Expression
impl From<FunctionCall> for Expression
Source§fn from(call: FunctionCall) -> Expression
fn from(call: FunctionCall) -> Expression
Converts to this type from the input type.
Source§impl From<FunctionExpression> for Expression
impl From<FunctionExpression> for Expression
Source§fn from(function: FunctionExpression) -> Self
fn from(function: FunctionExpression) -> Self
Converts to this type from the input type.
Source§impl From<HexNumber> for Expression
impl From<HexNumber> for Expression
Source§impl From<Identifier> for Expression
impl From<Identifier> for Expression
Source§fn from(identifier: Identifier) -> Self
fn from(identifier: Identifier) -> Self
Converts to this type from the input type.
Source§impl From<IfExpression> for Expression
impl From<IfExpression> for Expression
Source§fn from(if_expression: IfExpression) -> Expression
fn from(if_expression: IfExpression) -> Expression
Converts to this type from the input type.
Source§impl From<IndexExpression> for Expression
impl From<IndexExpression> for Expression
Source§fn from(index: IndexExpression) -> Self
fn from(index: IndexExpression) -> Self
Converts to this type from the input type.
Source§impl From<InterpolatedStringExpression> for Expression
impl From<InterpolatedStringExpression> for Expression
Source§fn from(interpolated_string: InterpolatedStringExpression) -> Self
fn from(interpolated_string: InterpolatedStringExpression) -> Self
Converts to this type from the input type.
Source§impl From<NumberExpression> for Expression
impl From<NumberExpression> for Expression
Source§fn from(number: NumberExpression) -> Self
fn from(number: NumberExpression) -> Self
Converts to this type from the input type.
Source§impl<T: Into<Expression>> From<Option<T>> for Expression
impl<T: Into<Expression>> From<Option<T>> for Expression
Source§impl From<ParentheseExpression> for Expression
impl From<ParentheseExpression> for Expression
Source§fn from(expression: ParentheseExpression) -> Self
fn from(expression: ParentheseExpression) -> Self
Converts to this type from the input type.
Source§impl From<Prefix> for Expression
impl From<Prefix> for Expression
Source§impl From<StringExpression> for Expression
impl From<StringExpression> for Expression
Source§fn from(string: StringExpression) -> Self
fn from(string: StringExpression) -> Self
Converts to this type from the input type.
Source§impl From<TableExpression> for Expression
impl From<TableExpression> for Expression
Source§fn from(table: TableExpression) -> Self
fn from(table: TableExpression) -> Self
Converts to this type from the input type.
Source§impl From<TypeCastExpression> for Expression
impl From<TypeCastExpression> for Expression
Source§fn from(type_cast: TypeCastExpression) -> Self
fn from(type_cast: TypeCastExpression) -> Self
Converts to this type from the input type.
Source§impl From<UnaryExpression> for Expression
impl From<UnaryExpression> for Expression
Source§fn from(unary: UnaryExpression) -> Self
fn from(unary: UnaryExpression) -> Self
Converts to this type from the input type.
Source§impl From<Variable> for Expression
impl From<Variable> for Expression
Source§impl From<bool> for Expression
impl From<bool> for Expression
Source§fn from(boolean: bool) -> Expression
fn from(boolean: bool) -> Expression
Converts to this type from the input type.
Source§impl From<f32> for Expression
impl From<f32> for Expression
Source§impl From<f64> for Expression
impl From<f64> for Expression
Source§fn from(value: f64) -> Expression
fn from(value: f64) -> Expression
Converts to this type from the input type.
Source§impl From<i16> for Expression
impl From<i16> for Expression
Source§impl From<i32> for Expression
impl From<i32> for Expression
Source§impl From<i64> for Expression
impl From<i64> for Expression
Source§impl From<i8> for Expression
impl From<i8> for Expression
Source§impl From<u16> for Expression
impl From<u16> for Expression
Source§impl From<u32> for Expression
impl From<u32> for Expression
Source§impl From<u64> for Expression
impl From<u64> for Expression
Source§impl From<u8> for Expression
impl From<u8> for Expression
Source§impl From<usize> for Expression
impl From<usize> for Expression
Source§impl FromIterator<Expression> for TupleArguments
impl FromIterator<Expression> for TupleArguments
Source§fn from_iter<T: IntoIterator<Item = Expression>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Expression>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl PartialEq for Expression
impl PartialEq for Expression
impl Eq for Expression
impl StructuralPartialEq for Expression
Auto Trait Implementations§
impl Freeze for Expression
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Source§fn extract_context(self, _original_input: I)
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> 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 moreSource§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
Source§fn recreate_context(_original_input: I, tail: I) -> 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