Class FormOfBooleanLogic

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

final class FormOfBooleanLogic extends Object implements Predicate<EK9Parser.ExpressionContext>
Predicate to determine if an expression is a Boolean logical operator (and/or) with Boolean type operands.

This is critical for complexity calculation because: - Boolean and/or creates branching (short-circuit evaluation) → adds complexity - Bits and/or is bitwise operation (no branching) → does NOT add complexity

Only returns true when: 1. Operator is "and" or "or" 2. BOTH operands are Boolean type (not Bits type)