Enum dmntk_feel::AstNode[][src]

pub enum AstNode {
Show 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>, FeelType), Div(Box<AstNode>, Box<AstNode>), Eq(Box<AstNode>, Box<AstNode>), Exp(Box<AstNode>, Box<AstNode>), ExpressionList(Vec<AstNode>), FilterExpression(Box<AstNode>, Box<AstNode>), ForExpression(Vec<(Name, AstNode, OptAstNode)>, Box<AstNode>), FormalParameter(NameFeelType), FormalParameters(Vec<AstNode>), FunctionBody(Box<AstNode>, bool), FunctionDefinition(Box<AstNode>, Box<AstNode>), FunctionInvocation(Box<AstNode>, Box<AstNode>), FunctionType(Box<AstNode>, FeelType), 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>, FeelType), IntervalEnd(Box<AstNode>, bool), IntervalStart(Box<AstNode>, bool), Irrelevant, IterationClauses(Vec<AstNode>), IterationContextSingle(Box<AstNode>), IterationContextRange(Box<AstNode>, Box<AstNode>), Le(Box<AstNode>, Box<AstNode>), Lt(Box<AstNode>, Box<AstNode>), List(Vec<AstNode>), ListType(FeelType), 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(StringString), Or(Box<AstNode>, Box<AstNode>), Out(Box<AstNode>, Box<AstNode>), ParameterName(Name), ParameterTypes(Vec<FeelType>), Path(Box<AstNode>, Box<AstNode>), PositionalParameters(Vec<AstNode>), QualifiedName(Vec<Name>), QuantifiedClauses(Vec<AstNode>), QuantifiedExpressionEvery(Box<AstNode>, Box<AstNode>), QuantifiedExpressionSome(Box<AstNode>, Box<AstNode>), Range(Box<AstNode>, Box<AstNode>), RangeType(FeelType), 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

Node representing an arithmetic operator +.

Node representing a logical operator and.

At(String)

Node representing a date and time 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 nodes.

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 order of appearance in definition.

ContextTypeEntry(Box<AstNode>, FeelType)

Node representing single context type entry, name-type pair.

Node representing arithmetic operator / (division).

ExpressionList(Vec<AstNode>)
FilterExpression(Box<AstNode>, Box<AstNode>)

Node representing filter expression.

ForExpression(Vec<(Name, AstNode, OptAstNode)>, Box<AstNode>)

Node representing for expression (iteration clauses, evaluated expression).

FormalParameter(NameFeelType)

Node representing function’s formal parameter. This node holds mandatory parameter’s name and optional parameter’s type. Parameter’s type must be valid FEEL type.

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>, FeelType)

Node representing function type (parameter types, result type).

Node representing IF expression (condition, result_when_true, result_when_false).

InstanceOf(Box<AstNode>, FeelType)
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.

IterationClauses(Vec<AstNode>)

List of iteration clauses, containing list of variables bounded to iteration contexts.

IterationContextSingle(Box<AstNode>)

Iteration context returning a single list of elements to iterate over.

IterationContextRange(Box<AstNode>, Box<AstNode>)

Iteration context built from the range of integers.

List(Vec<AstNode>)

Node representing a list.

ListType(FeelType)

Node representing list type; contains the type of list items.

Node representing arithmetic operator * (multiplication).

Name(Name)
NamedParameter(Box<AstNode>, Box<AstNode>)

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>)

Unary arithmetic negation -.

Null

Value of type Null.

Numeric(StringString)

Numeric value.

ParameterName(Name)

Name of the parameter in named parameter of the function invocation.

ParameterTypes(Vec<FeelType>)

Node representing a collection of function parameter types.

Node representing a path expression.

PositionalParameters(Vec<AstNode>)

Node representing a collection of positional parameters.

QualifiedName(Vec<Name>)
QuantifiedClauses(Vec<AstNode>)

List of quantified clauses, containing list of names bounded to expressions.

QuantifiedExpressionEvery(Box<AstNode>, Box<AstNode>)
QuantifiedExpressionSome(Box<AstNode>, Box<AstNode>)
Range(Box<AstNode>, Box<AstNode>)
RangeType(FeelType)

Node representing a definition of type range.

String(String)

Value of type string.

UnaryGe(Box<AstNode>)
UnaryGt(Box<AstNode>)
UnaryLe(Box<AstNode>)
UnaryLt(Box<AstNode>)

Implementations

Evaluates the type of the expression represented by this node.

Writes a trace of the AST starting from this node.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Converts AstNode to textual representation, including child nodes.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.