Class EnumerationIRHelper
java.lang.Object
org.ek9lang.compiler.phase7.helpers.AbstractIRHelper
org.ek9lang.compiler.phase7.helpers.EnumerationIRHelper
Handles IR generation for enumeration operators (16+ operators).
EK9 enumerations automatically receive extensive operator support including ordinal-based comparisons, string-enum hybrid operations, and utility operators. This demonstrates the complexity that requires stack-based context management.
Key capabilities:
- 7 Comparison operators: <=> == <> < <= > >= (ordinal-based)
- 7 String-hybrid operators: CardSuit.Hearts == "Hearts" (string conversion + compare)
- 5+ Utility operators: ? $ #^ $$ #? #< #> (various functions)
-
Field Summary
Fields inherited from class org.ek9lang.compiler.phase7.helpers.AbstractIRHelper
instructionBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionEnumerationIRHelper
(IRInstructionBuilder instructionBuilder) Create the enumeration IR helper. -
Method Summary
Modifier and TypeMethodDescriptionvoid
generateFor
(ISymbol symbol) Generate IR for enumeration operators in the given symbol.Methods inherited from class org.ek9lang.compiler.phase7.helpers.AbstractIRHelper
getContext
-
Constructor Details
-
EnumerationIRHelper
Create the enumeration IR helper.
-
-
Method Details
-
generateFor
Generate IR for enumeration operators in the given symbol.
-