Package org.ek9lang.compiler.directives
Interface Directive
- All Known Implementing Classes:
ErrorDirective
,GenusDirective
,ImplementsDirective
,NotResolvedDirective
,ResolutionDirective
,ResolvedDirective
public interface Directive
Provides basic interface for the EK9 internal @ type directives.
The idea is to accept this sort of thing.
These are used in development and testing, so that EK9 can be annotated as part of tests.
//@Error: SYMBOL_DEFINITION: PARENTHESIS_NOT_REQUIRED //@Error: REFERENCE_CHECKS: NOT_RESOLVED //@Resolved: EXPLICIT_TYPE_SYMBOL_DEFINITION: TEMPLATE_TYPE: "List" //@Resolved: EXPLICIT_TYPE_SYMBOL_DEFINITION: TYPE: "List of (Integer)" //@Instrument: CODE_GENERATION_PREPARATION: DEBUG //@Symbols: SYMBOL_DEFINITION: ALL: 21 //@Symbols: SYMBOL_DEFINITION: TYPE: 11 //@Symbols: SYMBOL_DEFINITION: TEMPLATE_FUNCTION: 2
//@Error: SYMBOL_DEFINITION: PARENTHESIS_NOT_REQUIRED //@Error: REFERENCE_CHECKS: NOT_RESOLVED //@Resolved: EXPLICIT_TYPE_SYMBOL_DEFINITION: TEMPLATE_TYPE: "List" //@Resolved: EXPLICIT_TYPE_SYMBOL_DEFINITION: TYPE: "List of (Integer)" //@Instrument: CODE_GENERATION_PREPARATION: DEBUG //@Symbols: SYMBOL_DEFINITION: ALL: 21 //@Symbols: SYMBOL_DEFINITION: TYPE: 11 //@Symbols: SYMBOL_DEFINITION: TEMPLATE_FUNCTION: 2
-
Method Summary
Modifier and TypeMethodDescriptionint
Which line number does this directive apply to.Provide a token from the source, by default if not possible supply synthetic.boolean
isForPhase
(CompilationPhase phase) Is it for the particular compiler phase.type()
What s the type of the directive.
-
Method Details
-
type
DirectiveType type()What s the type of the directive. -
isForPhase
Is it for the particular compiler phase. -
getAppliesToLineNumber
int getAppliesToLineNumber()Which line number does this directive apply to. -
getDirectiveToken
IToken getDirectiveToken()Provide a token from the source, by default if not possible supply synthetic.
-