Enum dsntk_feel_parser::AstNode
source · pub enum AstNode {
Show 71 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),
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>),
}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>)
Tuple Fields
Node representing single context type entry.
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>)
Tuple Fields
Quantified expression every.
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>)
Tuple Fields
0: Box<AstNode>Node representing iteration contexts.
Node representing for expression.
FormalParameter(Box<AstNode>, Box<AstNode>)
Tuple Fields
Node representing function’s formal parameter.
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>)
Tuple Fields
0: Box<AstNode>Node representing function’s parameter types as AstNode::ParameterTypes.
Node representing function type.
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>)
Tuple Fields
Node representing if expression.
In(Box<AstNode>, Box<AstNode>)
Node representing in operator.
InstanceOf(Box<AstNode>, Box<AstNode>)
Tuple Fields
Node representing type checking function.
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>)
Tuple Fields
Node representing iteration context containing the variable name and a list of elements to iterate over.
IterationContextRange(Box<AstNode>, Box<AstNode>, Box<AstNode>)
Tuple Fields
Node representing iteration context containing the variable name and a range of numbers to iterate over.
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>)
Tuple Fields
Node representing single named parameter.
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)
Node representing a value of type number.
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>)
Tuple Fields
Quantified context containing variable name and evaluation expression.
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>)
Tuple Fields
Node representing quantified expression some.
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 greater or equal.
UnaryGt(Box<AstNode>)
Node representing unary comparison operator greater than.
UnaryLe(Box<AstNode>)
Node representing unary comparison operator less or equal.
UnaryLt(Box<AstNode>)
Node representing unary comparison operator less than.