Implement binary expression syntax for the existing Expressif operators |AND, |OR, and |XOR.
Use a dedicated CST node:
BinaryExpressionSyntax
├── left: ExpressionSyntax
├── operator: BinaryOperatorSyntax
└── right: ExpressionSyntax
Examples:
foo |AND bar
foo |OR bar
foo |XOR bar
!foo |AND bar
Requirements:
- preserve the concrete operator in the CST;
- reuse ordinary expression syntax for both operands;
- define and test associativity and precedence explicitly;
- ensure unary negation binds more tightly than binary operators;
- distinguish
|AND, |OR, and |XOR from the ordinary | pipeline separator;
- keep semantic validation out of the parser.
Add corpus tests for each operator, chained expressions, unary/binary composition, whitespace, malformed operators, missing operands, and CST shape.
Implement binary expression syntax for the existing Expressif operators
|AND,|OR, and|XOR.Use a dedicated CST node:
Examples:
Requirements:
|AND,|OR, and|XORfrom the ordinary|pipeline separator;Add corpus tests for each operator, chained expressions, unary/binary composition, whitespace, malformed operators, missing operands, and CST shape.