Class FunctionDfnGenerator
java.lang.Object
org.ek9lang.compiler.phase7.AbstractDfnGenerator
org.ek9lang.compiler.phase7.FunctionDfnGenerator
- All Implemented Interfaces:
Function<EK9Parser.FunctionDeclarationContext,
IRConstruct>
final class FunctionDfnGenerator
extends AbstractDfnGenerator
implements Function<EK9Parser.FunctionDeclarationContext,IRConstruct>
Creates the appropriate IR Construct for a standalone function.
Functions are generated as class-like constructs with synthetic _call methods,
following the pattern of built-in generic functions like BiPredicate and Function.
This allows functions to be passed as delegates and called uniformly.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.phase7.AbstractDfnGenerator
notImplicitSuper, operationDfnGenerator, stackContext, voidStr
-
Constructor Summary
ConstructorsConstructorDescriptionFunctionDfnGenerator
(IRGenerationContext stackContext) Constructor using only stack context - the single source of state. -
Method Summary
Methods inherited from class org.ek9lang.compiler.phase7.AbstractDfnGenerator
createCallMetaDataExtractor, createDebugInfoCreator, createInitOperation, createInstanceInitOperation, getParsedModule, newPerConstructContext, newSyntheticInitOperation, processAsMethodOrOperator, processPropertiesForInstanceInit, processSyntheticConstructor
-
Constructor Details
-
FunctionDfnGenerator
FunctionDfnGenerator(IRGenerationContext stackContext) Constructor using only stack context - the single source of state.
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceFunction<EK9Parser.FunctionDeclarationContext,
IRConstruct>
-