Structure
ATLBinaryExpression
Represents binary operation expressions in ATL.
struct ATLBinaryExpression
Overview
Binary operation expressions support arithmetic, logical, comparison, and collection operations between two operand expressions. They provide the computational foundation for complex transformation logic and conditional evaluation.
Overview
Supported operation categories include:
-
Arithmetic: Addition, subtraction, multiplication, division, modulo
-
Comparison: Equality, inequality, relational comparisons
-
Logical: Boolean AND, OR operations
-
Collection: Union, intersection, difference operations
-
String: Concatenation and pattern matching
Example Usage
// Arithmetic operation
let addition = ATLBinaryExpression(
left: ATLVariableExpression(name: "x"),
operator: .plus,
right: ATLLiteralExpression(value: 10)
)
// Comparison operation
let comparison = ATLBinaryExpression(
left: ATLVariableExpression(name: "age"),
operator: .greaterThan,
right: ATLLiteralExpression(value: 18)
)
Topics
Operators
Initializers
Creates a new binary operation expression.
Instance Properties
The left operand expression.
The binary operator to apply.
The right operand expression.
Instance Methods
Evaluates the expression within the specified execution context.