Package org.ek9lang.compiler
Class ParsedModuleTransientData
java.lang.Object
org.ek9lang.compiler.ParsedModuleTransientData
Used to hold just the transient data that will be used by listeners and visitors and
SymbolsAndScopes.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDirectives
(DirectiveType type) Provide access to any directives recorded.getDirectives
(DirectiveType type, CompilationPhase phase) Provide access to any directives recorded of a specific type and compilation phase.getRecordedScope
(org.antlr.v4.runtime.tree.ParseTree node) Locate and return a recorded scope against part of the parse tree, this may return null if nothing has been recorded.getRecordedSymbol
(org.antlr.v4.runtime.tree.ParseTree node) Locate and return a recorded symbol against part of the parse tree, this may return null if nothing has been recorded.void
recordDirective
(Directive directive) When processing EK9 source code the developer now has some ability to use '@directives'.void
recordScope
(org.antlr.v4.runtime.tree.ParseTree node, IScope withScope) Record a particular node context during listen/visit of a context with a particular scope.void
recordSymbol
(org.antlr.v4.runtime.tree.ParseTree node, ISymbol symbol, Module module) Record a particular node context with a particular symbol.
-
Constructor Details
-
ParsedModuleTransientData
public ParsedModuleTransientData()
-
-
Method Details
-
recordDirective
When processing EK9 source code the developer now has some ability to use '@directives'. These are aimed at code compilation, instrumentation and error checking. This means that for compiler development, we can reduce the number of Java unit tests and specific coding (to some extent), by adding in our expectations just before we write so erroneous code (to check the compiler). This means that the test and the deliberated defective code as co-located. -
getDirectives
Provide access to any directives recorded of a specific type and compilation phase. -
getDirectives
Provide access to any directives recorded. -
recordScope
Record a particular node context during listen/visit of a context with a particular scope. -
getRecordedScope
Locate and return a recorded scope against part of the parse tree, this may return null if nothing has been recorded. -
recordSymbol
Record a particular node context with a particular symbol. -
getRecordedSymbol
Locate and return a recorded symbol against part of the parse tree, this may return null if nothing has been recorded.
-