diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-08-11 14:04:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-11 14:04:24 -0700 |
| commit | 495f88167527945e680e091d49b5705f5f1af1f9 (patch) | |
| tree | 8be4a0505bd121edbbcf5dd5b3cd9d43c51ec377 /source/slang/slang.cpp | |
| parent | db4079f7e3635a6a61b8725643b1d7ecf68b97d8 (diff) | |
| parent | b2febc7966c2533f756a6829656423f05b2f21e5 (diff) | |
Merge pull request #157 from tfoleyNV/syntax-lookup
Look up declaration keywords using ordinary scoping.
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index e66884923..11d9e6e86 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -31,7 +31,15 @@ Session::Session() // TODO: load these on-demand to avoid parsing // stdlib code for languages the user won't use. + baseLanguageScope = new Scope(); + + auto baseModuleDecl = populateBaseLanguageModule( + this, + baseLanguageScope); + loadedModuleCode.Add(baseModuleDecl); + coreLanguageScope = new Scope(); + coreLanguageScope->nextSibling = baseLanguageScope; hlslLanguageScope = new Scope(); hlslLanguageScope->nextSibling = coreLanguageScope; |
