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 RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionMethodNotOperatorOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(MethodSymbol methodSymbol, EK9Parser.MethodDeclarationContext methodDeclarationContext) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiConsumer
andThen
-
Constructor Details
-
MethodNotOperatorOrError
MethodNotOperatorOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
public void accept(MethodSymbol methodSymbol, EK9Parser.MethodDeclarationContext methodDeclarationContext) - Specified by:
acceptin interfaceBiConsumer<MethodSymbol, EK9Parser.MethodDeclarationContext>
-