Class EnumerationOperatorGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.EnumerationOperatorGenerator
Generates IR 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.generator.AbstractGenerator
debugInfoCreator, instructionBuilder, stackContext
-
Constructor Summary
ConstructorsConstructorDescriptionEnumerationOperatorGenerator
(IRGenerationContext stackContext) Create the enumeration operator generator using stack context. -
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.generator.AbstractGenerator
extractCallMetaData, getRecordedSymbolOrException
-
Constructor Details
-
EnumerationOperatorGenerator
EnumerationOperatorGenerator(IRGenerationContext stackContext) Create the enumeration operator generator using stack context.
-
-
Method Details
-
generateFor
Generate IR for enumeration operators in the given symbol.
-