Package org.ek9lang.compiler.phase1
Class NonExtendableMethodOrError
java.lang.Object
org.ek9lang.compiler.phase1.NonExtendableMethodOrError
- All Implemented Interfaces:
BiConsumer<MethodSymbol,
EK9Parser.MethodDeclarationContext>
final class NonExtendableMethodOrError
extends Object
implements BiConsumer<MethodSymbol,EK9Parser.MethodDeclarationContext>
Aimed at methods in services and a program (which is a method).
These constructs cannot be extended from, hence the idea of overrides and abstract does not make sense.
So this is the compromise of making the grammar more general and reusing stuff, we now must write a rule to
stop something that has been allowed in the grammar. But this gives us the opportunity to give more specific
error feed back.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(MethodSymbol methodSymbol, EK9Parser.MethodDeclarationContext methodDeclarationContext) 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.BiConsumer
andThen
-
Constructor Details
-
NonExtendableMethodOrError
NonExtendableMethodOrError(ErrorListener errorListener)
-
-
Method Details
-
accept
public void accept(MethodSymbol methodSymbol, EK9Parser.MethodDeclarationContext methodDeclarationContext) - Specified by:
accept
in interfaceBiConsumer<MethodSymbol,
EK9Parser.MethodDeclarationContext>
-