pub enum Expression {
Or {
span: Span,
operator: LogicalOperator,
left: Box<Expression>,
right: Box<Expression>,
},
And {
span: Span,
operator: LogicalOperator,
left: Box<Expression>,
right: Box<Expression>,
},
Not {
span: Span,
operator: LogicalOperator,
inner: Box<Expression>,
},
Comparison {
span: Span,
left: Box<Expression>,
operator: ComparisonOperator,
right: Box<Expression>,
},
FunctionCall {
span: Span,
name: String,
arguments: Vec<Expression>,
},
StringLiteral {
span: Span,
value: Vec<Element>,
},
NumberLiteral {
span: Span,
value: i64,
},
BoolLiteral {
span: Span,
value: bool,
},
Null {
span: Span,
},
Group {
span: Span,
inner: Box<Expression>,
},
Element(Box<Element>),
}Expand description
조건식 Expression AST
Variants§
Or
논리 OR 연산 (||)
And
논리 AND 연산 (&&)
Not
논리 NOT 연산 (!)
Comparison
비교 연산 (==, !=, >, <, >=, <=)
FunctionCall
함수 호출 (int, len, str)
StringLiteral
문자열 리터럴
NumberLiteral
숫자 리터럴
BoolLiteral
불리언 리터럴
Null
Null 리터럴
Group
괄호 그룹
Element(Box<Element>)
기존 Element를 expression 안에 포함 (Variable, Null 매크로 등)
Trait Implementations§
Source§impl Clone for Expression
impl Clone for Expression
Source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a duplicate 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
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