Package org.ek9lang.compiler.phase1
Class SymbolDefinition
java.lang.Object
org.ek9lang.compiler.CompilerPhase
org.ek9lang.compiler.phase1.SymbolDefinition
- All Implemented Interfaces:
BiFunction<Workspace,
CompilerFlags, CompilationPhaseResult>
Can be MULTI THREADED for developer source, but must be single threaded for bootstrapping.
Goes through the now successfully parse source files and uses
a listener to do the first real pass at building the IR - simple Symbol definitions.
This means identifying types and other symbols.
Uses Java 21 with full virtual Threads.
Note that most of the real processing is done in the
DefinitionListener
.
This is just the wrapper entry point that is public, so it can be plugged into the
FrontEndSupplier
.-
Field Summary
Fields inherited from class org.ek9lang.compiler.CompilerPhase
compilableProgramAccess, listener, reporter
-
Constructor Summary
ConstructorDescriptionSymbolDefinition
(boolean notBootStrapping, SharedThreadContext<CompilableProgram> compilableProgramAccess, Consumer<CompilationEvent> listener, CompilerReporter reporter) Create symbol definition instance with optional multi-threading.SymbolDefinition
(SharedThreadContext<CompilableProgram> compilableProgramAccess, Consumer<CompilationEvent> listener, CompilerReporter reporter) Create a new phase 1 symbol definition instance, defaults to multithreading enabled. -
Method Summary
Modifier and TypeMethodDescriptionboolean
doApply
(Workspace workspace, CompilerFlags compilerFlags) Do the compilation phase.Methods inherited from class org.ek9lang.compiler.CompilerPhase
apply
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
-
Constructor Details
-
Method Details
-
doApply
Description copied from class:CompilerPhase
Do the compilation phase.- Specified by:
doApply
in classCompilerPhase
-