Enum dsntk_feel_parser::AstNode
source · pub enum AstNode {
Show 73 variants
Add(Box<AstNode>, Box<AstNode>),
And(Box<AstNode>, Box<AstNode>),
At(String),
Between(Box<AstNode>, Box<AstNode>, Box<AstNode>),
Boolean(bool),
CommaList(Vec<AstNode>),
Context(Vec<AstNode>),
ContextEntry(Box<AstNode>, Box<AstNode>),
ContextEntryKey(Name),
ContextType(Vec<AstNode>),
ContextTypeEntry(Box<AstNode>, Box<AstNode>),
ContextTypeEntryKey(Name),
Div(Box<AstNode>, Box<AstNode>),
Eq(Box<AstNode>, Box<AstNode>),
EvaluatedExpression(Box<AstNode>),
Every(Box<AstNode>, Box<AstNode>),
Exp(Box<AstNode>, Box<AstNode>),
ExpressionList(Vec<AstNode>),
FeelType(FeelType),
Filter(Box<AstNode>, Box<AstNode>),
For(Box<AstNode>, Box<AstNode>),
FormalParameter(Box<AstNode>, Box<AstNode>),
FormalParameters(Vec<AstNode>),
FunctionBody(Box<AstNode>, bool),
FunctionDefinition(Box<AstNode>, Box<AstNode>),
FunctionInvocation(Box<AstNode>, Box<AstNode>),
FunctionType(Box<AstNode>, Box<AstNode>),
Ge(Box<AstNode>, Box<AstNode>),
Gt(Box<AstNode>, Box<AstNode>),
If(Box<AstNode>, Box<AstNode>, Box<AstNode>),
In(Box<AstNode>, Box<AstNode>),
InstanceOf(Box<AstNode>, Box<AstNode>),
IntervalEnd(Box<AstNode>, bool),
IntervalStart(Box<AstNode>, bool),
Irrelevant,
IterationContexts(Vec<AstNode>),
IterationContextList(Box<AstNode>, Box<AstNode>),
IterationContextRange(Box<AstNode>, Box<AstNode>, Box<AstNode>),
Le(Box<AstNode>, Box<AstNode>),
Lt(Box<AstNode>, Box<AstNode>),
List(Vec<AstNode>),
ListType(Box<AstNode>),
Mul(Box<AstNode>, Box<AstNode>),
Name(Name),
NamedParameter(Box<AstNode>, Box<AstNode>),
NamedParameters(Vec<AstNode>),
NegatedList(Vec<AstNode>),
Neg(Box<AstNode>),
Nq(Box<AstNode>, Box<AstNode>),
Null,
Numeric(String, String, char, String),
Or(Box<AstNode>, Box<AstNode>),
Out(Box<AstNode>, Box<AstNode>),
ParameterName(Name),
ParameterTypes(Vec<AstNode>),
Path(Box<AstNode>, Box<AstNode>),
PositionalParameters(Vec<AstNode>),
QualifiedName(Vec<AstNode>),
QualifiedNameSegment(Name),
QuantifiedContexts(Vec<AstNode>),
QuantifiedContext(Box<AstNode>, Box<AstNode>),
Range(Box<AstNode>, Box<AstNode>),
RangeType(Box<AstNode>),
Satisfies(Box<AstNode>),
Some(Box<AstNode>, Box<AstNode>),
String(String),
Sub(Box<AstNode>, Box<AstNode>),
UnaryGe(Box<AstNode>),
UnaryGt(Box<AstNode>),
UnaryLe(Box<AstNode>),
UnaryLt(Box<AstNode>),
UnaryEq(Box<AstNode>),
UnaryNe(Box<AstNode>),
}Expand description
Node of the Abstract Syntax Tree for FEEL grammar.
Variants§
Add(Box<AstNode>, Box<AstNode>)
Node representing an arithmetic operator + (addition).
And(Box<AstNode>, Box<AstNode>)
Node representing a logical operator and (conjunction).
At(String)
Node representing @ (at) literal.
Between(Box<AstNode>, Box<AstNode>, Box<AstNode>)
Node representing a comparison operator between.
Boolean(bool)
Node representing a value of type boolean.
CommaList(Vec<AstNode>)
Node representing a comma separated list of AST nodes, used internally by parser.
Context(Vec<AstNode>)
Node representing a context. Context entries are stored in the order of appearance in definition.
ContextEntry(Box<AstNode>, Box<AstNode>)
Node representing single context entry; key-value pair.
ContextEntryKey(Name)
Node representing the key of the context entry; the key in context entry may be a name or string literal. String literals are converted to one segment names containing exactly the value of the string.
ContextType(Vec<AstNode>)
Node representing the type of a context. Context type is defined by names and types of all entries. This node contains a collection of types for all context entries in the order of appearance in context type definition.
ContextTypeEntry(Box<AstNode>, Box<AstNode>)
Node representing single context type entry.
Tuple Fields
ContextTypeEntryKey(Name)
Node representing the key of the entry in context type definition.
In context type definition, only FEEL name is allowed as an entry key.
Div(Box<AstNode>, Box<AstNode>)
Node representing arithmetic operator / (division).
Eq(Box<AstNode>, Box<AstNode>)
Node representing equal comparison.
EvaluatedExpression(Box<AstNode>)
Node representing an expression evaluated as a body of for expression.
Every(Box<AstNode>, Box<AstNode>)
Quantified expression every.
Tuple Fields
Exp(Box<AstNode>, Box<AstNode>)
Node representing exponential function.
ExpressionList(Vec<AstNode>)
Node representing a list of expressions.
FeelType(FeelType)
Node representing FEEL type.
Filter(Box<AstNode>, Box<AstNode>)
Node representing filter expression.
For(Box<AstNode>, Box<AstNode>)
Node representing for expression.
Tuple Fields
0: Box<AstNode>Node representing iteration contexts.
FormalParameter(Box<AstNode>, Box<AstNode>)
Node representing function’s formal parameter.
Tuple Fields
FormalParameters(Vec<AstNode>)
Node representing a list of formal parameters.
FunctionBody(Box<AstNode>, bool)
Node representing function’s body. This node holds mandatory function body and a flag indicating if the function is external.
FunctionDefinition(Box<AstNode>, Box<AstNode>)
Node representing function definition. This node holds function’s formal parameter list and function’s body.
FunctionInvocation(Box<AstNode>, Box<AstNode>)
Node representing function invocation.
FunctionType(Box<AstNode>, Box<AstNode>)
Node representing function type.
Tuple Fields
0: Box<AstNode>Node representing function’s parameter types as AstNode::ParameterTypes.
Ge(Box<AstNode>, Box<AstNode>)
Node representing greater or equal comparison.
Gt(Box<AstNode>, Box<AstNode>)
Node representing greater than comparison.
If(Box<AstNode>, Box<AstNode>, Box<AstNode>)
Node representing if expression.
Tuple Fields
In(Box<AstNode>, Box<AstNode>)
Node representing in operator.
InstanceOf(Box<AstNode>, Box<AstNode>)
Node representing type checking function.
Tuple Fields
IntervalEnd(Box<AstNode>, bool)
Node representing the interval end used in ranges.
IntervalStart(Box<AstNode>, bool)
Node representing the interval start used in ranges.
Irrelevant
Node representing the comparison operator irrelevant.
IterationContexts(Vec<AstNode>)
List of iteration contexts.
IterationContextList(Box<AstNode>, Box<AstNode>)
Node representing iteration context containing the variable name and a list of elements to iterate over.
Tuple Fields
IterationContextRange(Box<AstNode>, Box<AstNode>, Box<AstNode>)
Node representing iteration context containing the variable name and a range of numbers to iterate over.
Tuple Fields
Le(Box<AstNode>, Box<AstNode>)
Node representing less or equal comparison.
Lt(Box<AstNode>, Box<AstNode>)
Node representing less than comparison.
List(Vec<AstNode>)
Node representing a list.
ListType(Box<AstNode>)
Node representing a list type.
Mul(Box<AstNode>, Box<AstNode>)
Node representing arithmetic operator * (multiplication).
Name(Name)
Node representing a FEEL name.
NamedParameter(Box<AstNode>, Box<AstNode>)
Node representing single named parameter.
Tuple Fields
NamedParameters(Vec<AstNode>)
Node representing a collection of named parameters.
NegatedList(Vec<AstNode>)
Node representing a negated list (used in negated unary tests).
Neg(Box<AstNode>)
Node representing an unary arithmetic negation -.
Nq(Box<AstNode>, Box<AstNode>)
Node representing not equal comparison.
Null
Node representing a value of type Null.
Numeric(String, String, char, String)
Node representing a value of type number.
Tuple Fields
Or(Box<AstNode>, Box<AstNode>)
Node representing a logical operator or (disjunction).
Out(Box<AstNode>, Box<AstNode>)
Node representing expression for selecting decision table’s output value.
ParameterName(Name)
Node representing a name of the function’s formal parameter.
ParameterTypes(Vec<AstNode>)
Node representing a collection of function parameter types.
Path(Box<AstNode>, Box<AstNode>)
Node representing a path expression.
PositionalParameters(Vec<AstNode>)
Node representing a collection of positional parameters.
QualifiedName(Vec<AstNode>)
Node representing a collection of names that constitute a qualified name.
QualifiedNameSegment(Name)
Node representing a segment of a qualified name.
QuantifiedContexts(Vec<AstNode>)
List of quantified contexts.
QuantifiedContext(Box<AstNode>, Box<AstNode>)
Quantified context containing variable name and evaluation expression.
Tuple Fields
Range(Box<AstNode>, Box<AstNode>)
Node representing a range of values.
RangeType(Box<AstNode>)
Node representing range type.
Satisfies(Box<AstNode>)
Node representing satisfies clause in quantified expression.
Some(Box<AstNode>, Box<AstNode>)
Node representing quantified expression some.
Tuple Fields
String(String)
Node representing a value of type string.
Sub(Box<AstNode>, Box<AstNode>)
Node representing an arithmetic operator - (subtraction).
UnaryGe(Box<AstNode>)
Node representing unary comparison operator >=.
UnaryGt(Box<AstNode>)
Node representing unary comparison operator >.
UnaryLe(Box<AstNode>)
Node representing unary comparison operator <=>.
UnaryLt(Box<AstNode>)
Node representing unary comparison operator <less than>.
UnaryEq(Box<AstNode>)
Node representing unary comparison operator =.
UnaryNe(Box<AstNode>)
Node representing unary comparison operator !=.
Implementations§
Trait Implementations§
impl StructuralPartialEq for AstNode
Auto Trait Implementations§
impl Freeze for AstNode
impl RefUnwindSafe for AstNode
impl Send for AstNode
impl Sync for AstNode
impl Unpin for AstNode
impl UnwindSafe for AstNode
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)