Package org.ek9lang.compiler.support
Class CheckAndPopulateOperator
java.lang.Object
org.ek9lang.compiler.support.CheckAndPopulateOperator
- All Implemented Interfaces:
BiFunction<EK9Parser.OperatorDeclarationContext,
IAggregateSymbol, MethodSymbol>
class CheckAndPopulateOperator
extends Object
implements BiFunction<EK9Parser.OperatorDeclarationContext,IAggregateSymbol,MethodSymbol>
Deals with normal operators (i.e. fully defined) and also 'default' operators.
The use of 'default' maybe inappropriate by the EK9 developer this code will check for that
and issue errors as appropriate.
Note, we allow duplicate operators to be defined, but later phase will detect those.
Note, we allow duplicate operators to be defined, but later phase will detect those.
-
Field Summary
Modifier and TypeFieldDescription(package private) final AggregateFactory
(package private) final ErrorListener
(package private) final Function
<IAggregateSymbol, String> -
Constructor Summary
ConstructorDescriptionCheckAndPopulateOperator
(AggregateFactory aggregateFactory, ErrorListener errorListener) -
Method Summary
Modifier and TypeMethodDescriptionapply
(EK9Parser.OperatorDeclarationContext ctx, IAggregateSymbol aggregate) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
aggregateFactory
-
errorListener
-
messageFor
-
-
Constructor Details
-
CheckAndPopulateOperator
CheckAndPopulateOperator(AggregateFactory aggregateFactory, ErrorListener errorListener)
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceBiFunction<EK9Parser.OperatorDeclarationContext,
IAggregateSymbol, MethodSymbol>
-