Package org.ek9lang.compiler.support
Class OperationFactory
java.lang.Object
org.ek9lang.compiler.support.CommonFactory
org.ek9lang.compiler.support.OperationFactory
-
Field Summary
Fields inherited from class org.ek9lang.compiler.support.CommonFactory
aggregateManipulator, checkContextNotNull, parsedModule
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
A bit of a beast this method.newMethod
(EK9Parser.MethodDeclarationContext ctx, String methodName, IScopedSymbol scopedSymbol) Create a new method with a specific name.newMethod
(EK9Parser.MethodDeclarationContext ctx, IScopedSymbol scopedSymbol) Create a new method that represents an EK9 class/component method.newOperationCall
(EK9Parser.OperationCallContext ctx, IScope scope) New call but modelled as an operator if marked as such.newOperator
(EK9Parser.OperatorDeclarationContext ctx, IAggregateSymbol aggregate) Create a new aggregate that represents an EK9 operator, uses a method for this.Create a new aggregate that represents an EK9 type, constrained or enumeration.Methods inherited from class org.ek9lang.compiler.support.CommonFactory
configureAggregate, configureSymbol, createAndRegisterParameterisedSymbols, getAggregateFactory, getDefaultOperatorInitializer, getDefaultOperatorSymbolInitializer
-
Constructor Details
-
OperationFactory
OperationFactory(ParsedModule parsedModule)
-
-
Method Details
-
newOperator
public MethodSymbol newOperator(EK9Parser.OperatorDeclarationContext ctx, IAggregateSymbol aggregate) Create a new aggregate that represents an EK9 operator, uses a method for this. -
addMissingDefaultOperators
public boolean addMissingDefaultOperators(EK9Parser.DefaultOperatorContext ctx, IAggregateSymbol aggregate) A bit of a beast this method. Check if operator is not present if so add one in. But as it is used in very early phase of compilation not all types will be known. So here this method just uses the raw name of the method. -
newMethod
Create a new method that represents an EK9 class/component method. -
newMethod
public MethodSymbol newMethod(EK9Parser.MethodDeclarationContext ctx, String methodName, IScopedSymbol scopedSymbol) Create a new method with a specific name. -
newType
Create a new aggregate that represents an EK9 type, constrained or enumeration. -
newOperationCall
New call but modelled as an operator if marked as such.
-