Class ServiceDfnGenerator
java.lang.Object
org.ek9lang.compiler.phase7.AbstractDfnGenerator
org.ek9lang.compiler.phase7.ServiceDfnGenerator
- All Implemented Interfaces:
Function<EK9Parser.ServiceDeclarationContext, IRConstruct>
final class ServiceDfnGenerator
extends AbstractDfnGenerator
implements Function<EK9Parser.ServiceDeclarationContext, IRConstruct>
Creates the appropriate IR Construct for a service declaration.
Services are AggregateSymbols with genus SymbolGenus.SERVICE.
Unlike classes/components, service declarations do not use aggregateParts in the grammar.
Instead, they contain methodDeclaration and serviceOperationDeclaration directly.
serviceDeclaration
: identifier FOR? Uriproto AS? NL+
INDENT NL* (directive? (methodDeclaration | serviceOperationDeclaration))* DEDENT
;
Service operations have HTTP metadata (verb, URI path) stored in squirrelled data. This metadata is preserved through IR generation for runtime HTTP binding.
-
Field Summary
Fields inherited from class AbstractDfnGenerator
generators, notImplicitSuper, operationDfnGenerator, stackContext, voidStr -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractDfnGenerator
createDebugInfoCreator, createInitOperation, createInstanceInitOperation, getParsedModule, newPerConstructContext, newSyntheticInitOperation, processAsMethodOrOperator, processPropertiesForInstanceInit, processSyntheticConstructor
-
Constructor Details
-
ServiceDfnGenerator
ServiceDfnGenerator(IRGenerationContext stackContext)
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<EK9Parser.ServiceDeclarationContext, IRConstruct>
-