Package com.libdbm.cel.ast
Interface Expression
- All Known Implementing Classes:
Binary,Call,Comprehension,Conditional,Identifier,Index,ListExpression,Literal,MapExpression,Select,Struct,Unary
public sealed interface Expression
permits Literal, Identifier, Select, Call, ListExpression, MapExpression, Struct, Comprehension, Unary, Binary, Conditional, Index
Base class for all CEL expression nodes in the Abstract Syntax Tree.
Uses the Visitor pattern to enable different operations on expressions such as evaluation, type checking, or code generation.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceVisitor interface for traversing and operating on CEL expression nodes. -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(Expression.Visitor<T> visitor) Accepts a visitor to perform operations on this expression node.
-
Method Details
-
accept
Accepts a visitor to perform operations on this expression node.Invokes the appropriate visit method on the provided visitor, dispatching the visit operation to the visitor implementation that corresponds to the type of this expression node.
- Type Parameters:
T- the return type of the visitor's visit operations- Parameters:
visitor- the visitor that will operate on this expression node- Returns:
- the result of the visitor's visit operation
-