Class SquirrelledDirective

java.lang.Object
org.ek9lang.compiler.directives.ResolutionDirective
org.ek9lang.compiler.directives.SquirrelledDirective
All Implemented Interfaces:
Directive

public class SquirrelledDirective extends ResolutionDirective
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 Details

    • SquirrelledDirective

      public SquirrelledDirective(DirectiveSpec spec)
  • Method Details

    • type

      public DirectiveType type()
      Description copied from interface: Directive
      What s the type of the directive.