document the third pass

This commit is contained in:
ryuukk 2023-02-05 02:15:31 +01:00
parent 627592e4e0
commit a245a27ad3
1 changed files with 7 additions and 0 deletions

View File

@ -27,12 +27,19 @@ import dsymbol.deferred;
import containers.hashset; import containers.hashset;
/**
* Used to resolve remaining symbols when trying to parse modules that depend on each other (public imports)
*/
void thirdPass(Scope* mscope, ref ModuleCache cache, size_t cursorPosition) void thirdPass(Scope* mscope, ref ModuleCache cache, size_t cursorPosition)
{ {
auto desired = mscope.getScopeByCursor(cursorPosition); auto desired = mscope.getScopeByCursor(cursorPosition);
tryResolve(desired, cache); tryResolve(desired, cache);
} }
/**
* Used to resolve missing symbols within a scope
*/
void tryResolve(Scope* sc, ref ModuleCache cache) void tryResolve(Scope* sc, ref ModuleCache cache)
{ {
if (sc is null) return; if (sc is null) return;