Class UnaryOperationGeneratorWithProcessor
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.UnaryOperationGenerator
org.ek9lang.compiler.phase7.generator.UnaryOperationGeneratorWithProcessor
- All Implemented Interfaces:
Function<ExprProcessingDetails,
List<IRInstr>>
Wrapper for UnaryOperationGenerator that injects the recursive expression processor.
This allows the generator to handle complex nested expressions like -(-x) or -(a + b).
-
Field Summary
Fields inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
debugInfoCreator, instructionBuilder, stackContext
-
Constructor Summary
ConstructorsConstructorDescriptionUnaryOperationGeneratorWithProcessor
(IRGenerationContext stackContext, Function<ExprProcessingDetails, List<IRInstr>> expressionProcessor) -
Method Summary
Modifier and TypeMethodDescriptionprocessOperandExpression
(EK9Parser.ExpressionContext operandExpr, VariableDetails operandDetails) Process operand expression - this should be overridden by subclasses to provide actual expression processing.Methods inherited from class org.ek9lang.compiler.phase7.generator.UnaryOperationGenerator
apply
Methods inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
extractCallMetaData, getRecordedSymbolOrException
-
Constructor Details
-
UnaryOperationGeneratorWithProcessor
UnaryOperationGeneratorWithProcessor(IRGenerationContext stackContext, Function<ExprProcessingDetails, List<IRInstr>> expressionProcessor)
-
-
Method Details
-
processOperandExpression
protected List<IRInstr> processOperandExpression(EK9Parser.ExpressionContext operandExpr, VariableDetails operandDetails) Description copied from class:UnaryOperationGenerator
Process operand expression - this should be overridden by subclasses to provide actual expression processing. Default implementation returns empty list.- Specified by:
processOperandExpression
in classUnaryOperationGenerator
-