Class OperatorTest
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.OperatorTest
- All Implemented Interfaces:
BiPredicate<IToken,ISymbol>
- Direct Known Subclasses:
ComparatorPresentOrError, DecrementPresentOrError, HashCodePresentOrError, IncrementPresentOrError, IsSetPresentOrError
Provides a common set of operations for checking operators.
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOperatorTest(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Modifier and TypeMethodDescriptiondecidedForType(ISymbol symbolType) THE steptest(IToken, ISymbol)andtestType(IToken, ISymbol)both take before searching for the operator: a type for which this operator is decided without a search (for '?': a function, Any, text, an enumeration).protected abstract MethodSymbolSearchgetMethodSymbolSearch(ISymbol symbolType) getSymbolType(ISymbol symbol) protected booleanbooleannotAnEnumerationTypeOrError(IToken operatorUse, ISymbol operand) Is this operand a value rather than the enumeration TYPE itself? E07630 when it is the type.booleanbooleanAstest(IToken, ISymbol), for a TYPE rather than a value of it - e.g.Methods inherited from class TypedSymbolAccess
emitTypeNotResolvedError, getRecordedAndTypedSymbol, isAlreadyInError, isProcessingScopePure, isPureReassignmentDisallowed, recordATypedSymbolMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiPredicate
and, negate, or
-
Constructor Details
-
OperatorTest
-
-
Method Details
-
getMethodSymbolSearch
-
getSymbolType
-
isOperatorPresent
-
decidedForType
THE steptest(IToken, ISymbol)andtestType(IToken, ISymbol)both take before searching for the operator: a type for which this operator is decided without a search (for '?': a function, Any, text, an enumeration). Empty means search. -
notAnEnumerationTypeOrError
Is this operand a value rather than the enumeration TYPE itself? E07630 when it is the type. For the operators that then judge their operands' common TYPE withtestType(IToken, ISymbol). -
testType
Astest(IToken, ISymbol), for a TYPE rather than a value of it - e.g. a stream stage that only knows the element type, or a coalescing operator judging its operands' common type. -
test
-