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>), IterationContextSingle(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

§0: Box<AstNode>

Node representing entry name of the context key.

§1: Box<AstNode>

Node representing FEEL type of the context entry.

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

§0: Box<AstNode>

Node representing quantified contexts.

§1: Box<AstNode>

Node representing an expression after satisfies clause.

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.

§1: Box<AstNode>

Node representing an expression to be evaluated.

Node representing for expression.

§

FormalParameter(Box<AstNode>, Box<AstNode>)

Tuple Fields

§0: Box<AstNode>

Node representing the name of the parameter.

§1: Box<AstNode>

Node representing the FEEL type of the parameter.

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.

§1: Box<AstNode>

Node representing function’s result type.

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

§0: Box<AstNode>

Node representing the condition.

§1: Box<AstNode>

Node representing the expression to be evaluated when condition is true.

§2: Box<AstNode>

Node representing the expression to be evaluated when condition is false.

Node representing if expression.

§

In(Box<AstNode>, Box<AstNode>)

Node representing in operator.

§

InstanceOf(Box<AstNode>, Box<AstNode>)

Tuple Fields

§0: Box<AstNode>

Node representing the tested value.

§1: Box<AstNode>

Node representing FELL type to be checked.

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.

§

IterationContextSingle(Box<AstNode>, Box<AstNode>)

Tuple Fields

§0: Box<AstNode>

Node representing variable name used in this iteration context.

§1: Box<AstNode>

Node representing a single list of elements to iterate over.

Node representing iteration context containing the variable name and a single list of elements to iterate over.

§

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

Tuple Fields

§0: Box<AstNode>

Node representing variable name used in this iteration context.

§1: Box<AstNode>

Node representing the start of the range of numbers to iterate over.

§2: Box<AstNode>

Node representing the end of the range of numbers to iterate over.

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

§0: Box<AstNode>

Node representing parameter name.

§1: Box<AstNode>

Node representing parameter type.

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

§0: Box<AstNode>

Node representing variable name used in this quantified context.

§1: Box<AstNode>

Node representing evaluation expression.

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

§0: Box<AstNode>

Node representing quantified contexts.

§1: Box<AstNode>

Node representing an expression after satisfies clause.

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.

Implementations§

source§

impl AstNode

source

pub fn trace(&self) -> String

Prints a trace of the AST, starting from specified node.

Trait Implementations§

source§

impl Clone for AstNode

source§

fn clone(&self) -> AstNode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AstNode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for AstNode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Converts AstNode to textual representation, including child nodes.

source§

impl PartialEq for AstNode

source§

fn eq(&self, other: &AstNode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for AstNode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.