Class IsNegation

java.lang.Object
org.ek9lang.compiler.phase1.IsNegation
All Implemented Interfaces:
Predicate<EK9Parser.ExpressionContext>

final class IsNegation extends Object implements Predicate<EK9Parser.ExpressionContext>
THE "is this a negation applied to one operand?" - word not b, ~b or unary -x. Keyed on the OPERATOR, not the spelling (Steve, 2026-10-08, Q9): all three call _negate (OperatorMap.getPrefixForward(String), the mapping IR generation lowers them through), so any two of them applied to one operand cancel out (E08274, DoubleNegationOrError). Binary - has a left operand and is subtraction, never a negation, and -- is the decrement token, never two negations. Part of BinaryExpressions.