diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-06-26 12:04:54 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-26 12:04:54 -0700 |
| commit | 3f316dcbd9274efc74f817cf36f17a511ff2e21e (patch) | |
| tree | 185210d30a7887df823bb0c6d817d3feb2ebe675 /source/slang/slang.cpp | |
| parent | d506737b8b00bcc89adf937994ceb6df4509c98a (diff) | |
| parent | 07f9b9ec7c9be6a0eff65ef327d2a0fee262aed7 (diff) | |
Merge pull request #42 from tfoleyNV/reflect-imported
Reflect imported code
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 37d72cadc..fc18ea1cf 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -419,7 +419,8 @@ RefPtr<ProgramSyntaxNode> CompileRequest::loadModule( RefPtr<ProgramSyntaxNode> moduleDecl = translationUnit->SyntaxNode; - loadedModules.Add(name, moduleDecl); + loadedModulesMap.Add(name, moduleDecl); + loadedModulesList.Add(moduleDecl); return moduleDecl; @@ -434,7 +435,7 @@ String CompileRequest::autoImportModule( String name = path; // Have we already loaded a module matching this name? - if (loadedModules.TryGetValue(name)) + if (loadedModulesMap.TryGetValue(name)) return name; loadModule(name, path, source, loc); @@ -449,7 +450,7 @@ RefPtr<ProgramSyntaxNode> CompileRequest::findOrImportModule( // Have we already loaded a module matching this name? // If so, return it. RefPtr<ProgramSyntaxNode> moduleDecl; - if (loadedModules.TryGetValue(name, moduleDecl)) + if (loadedModulesMap.TryGetValue(name, moduleDecl)) return moduleDecl; // Derive a file name for the module, by taking the given @@ -488,7 +489,7 @@ RefPtr<ProgramSyntaxNode> CompileRequest::findOrImportModule( { this->mSink.diagnose(loc, Diagnostics::cannotFindFile, fileName); - loadedModules[name] = nullptr; + loadedModulesMap[name] = nullptr; return nullptr; } break; |
