Class SquirrelledDirective
java.lang.Object
org.ek9lang.compiler.directives.ResolutionDirective
org.ek9lang.compiler.directives.SquirrelledDirective
- All Implemented Interfaces:
Directive
To be used in EK9 source code to assert that a specific squirrelled-data key is set
(to any non-null value) on a resolved symbol at the given compilation phase.
Squirrelled data is the compiler's general cross-phase metadata mechanism (set on
ISymbol via
ISymbol.putSquirrelledData(CommonValues, String)). The keys are entries
of CommonValues.
Example — assert the CONCURRENT_ENTRY_POINT marker has been set on a TCP
handler function by the end of FULL_RESOLUTION:
@Squirrelled: FULL_RESOLUTION: FUNCTION: "myTcpHandler": CONCURRENT_ENTRY_POINT
The "additional name" segment is the CommonValues enum entry name. The listener emits
E50330 if the key is unset, or E50340 if the key is not a valid CommonValues
entry.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ResolutionDirective
getAdditionalName, getAppliesToLineNumber, getDirectiveToken, getSymbolCategory, getSymbolName, getSymbolSearch, isForPhase, isForVariable, toString
-
Constructor Details
-
SquirrelledDirective
-
-
Method Details
-
type
Description copied from interface:DirectiveWhat s the type of the directive.
-