Class IsSetPresentOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.OperatorTest
org.ek9lang.compiler.phase3.IsSetPresentOrError
- All Implemented Interfaces:
BiPredicate<IToken,ISymbol>
Given a symbol, this check that the type that the symbol has can support the '?' operation.
This includes variable/expressions that have a type that is a function.
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionIsSetPresentOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Modifier and TypeMethodDescriptiondecidedForType(ISymbol symbolType) The types '?' is decided for without a search - shared bytest(IToken, ISymbol)andOperatorTest.testType(IToken, ISymbol)(B-2, so the coalescing operators judging a common type get them too).protected MethodSymbolSearchgetMethodSymbolSearch(ISymbol symbolType) booleanMethods inherited from class OperatorTest
getSymbolType, isOperatorPresent, notAnEnumerationTypeOrError, testTypeMethods 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
-
IsSetPresentOrError
IsSetPresentOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
test
- Specified by:
testin interfaceBiPredicate<IToken,ISymbol> - Overrides:
testin classOperatorTest
-
decidedForType
The types '?' is decided for without a search - shared bytest(IToken, ISymbol)andOperatorTest.testType(IToken, ISymbol)(B-2, so the coalescing operators judging a common type get them too).Functions and 'Any' always support is-set (a function is set when present; 'Any' will actually have a sub-type and that may implement is-set, else a default is returned). A 'text' aggregate has no operators but can be checked with ? and :=? (a presence check in the implementation), and so can an enumeration value.
- Overrides:
decidedForTypein classOperatorTest
-
getMethodSymbolSearch
- Specified by:
getMethodSymbolSearchin classOperatorTest
-