Package org.ek9lang.compiler.phase1
Class MethodNotOperatorOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.phase1.MethodNotOperatorOrError
- All Implemented Interfaces:
BiConsumer<MethodSymbol,
EK9Parser.MethodDeclarationContext>
final class MethodNotOperatorOrError
extends RuleSupport
implements BiConsumer<MethodSymbol,EK9Parser.MethodDeclarationContext>
Just checks that named operator methods:
mod, rem, abs, sqrt, open, close, contains, matches, empty, length
are not being used as just method names.
They are reserved for operators and the semantics that go with those operators.
While they could be used with different arguments/parameters - this might be confusing.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorDescriptionMethodNotOperatorOrError
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
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
-
MethodNotOperatorOrError
MethodNotOperatorOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
public void accept(MethodSymbol methodSymbol, EK9Parser.MethodDeclarationContext methodDeclarationContext) - Specified by:
accept
in interfaceBiConsumer<MethodSymbol,
EK9Parser.MethodDeclarationContext>
-