Package org.ek9lang.compiler.phase1
Class ModuleDuplicateSymbolChecks
java.lang.Object
org.ek9lang.compiler.CompilerPhase
org.ek9lang.compiler.phase1.ModuleDuplicateSymbolChecks
- All Implemented Interfaces:
BiFunction<Workspace,
CompilerFlags, CompilationPhaseResult>
Goes through each module name and checks each of the parsedModules in that module name to check
there is only a single copy of that symbol in the whole module name space.
This is because we allow multithreaded loading of each source file.
This is an additional 'paranoid' check to ensure no module has the same symbol name in use at the top level.
Eventually it will be retired - but during development - it may enable early warning of threading issues.
Or other issues. but it's best to catch as early as possible.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.CompilerPhase
compilableProgramAccess, listener, reporter
-
Constructor Summary
ConstructorDescriptionModuleDuplicateSymbolChecks
(SharedThreadContext<CompilableProgram> compilableProgramAccess, Consumer<CompilationEvent> listener, CompilerReporter reporter) Create a new duplicate checker for modules contained in the compilable program. -
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
-