Package org.ek9lang.compiler.common
Class AppropriateBodyOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.AppropriateBodyOrError
- All Implemented Interfaces:
BiConsumer<MethodSymbol,
EK9Parser.OperationDetailsContext>
public class AppropriateBodyOrError
extends RuleSupport
implements BiConsumer<MethodSymbol,EK9Parser.OperationDetailsContext>
Checks if the body of a method/operator is appropriate.
i.e. has it been marked as abstract or default - neither of which need a body.
Emits compiler error if inappropriate.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorDescriptionAppropriateBodyOrError
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Create new checker. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(MethodSymbol methodSymbol, EK9Parser.OperationDetailsContext ctx) 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
-
AppropriateBodyOrError
Create new checker.
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceBiConsumer<MethodSymbol,
EK9Parser.OperationDetailsContext>
-