diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-01-29 16:32:52 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-29 16:32:52 -0800 |
| commit | b6bc0837ba6e7fb42280bf6289f4dab633c88392 (patch) | |
| tree | 1a802fe0f95eaed5d844a55acb666a4791442051 /source/slang/parser.cpp | |
| parent | 06f0effb848c6b938e03da8a61e44b3d032380e8 (diff) | |
Remove #import directive (#389)
Fixes #380
The `#import` directive was a stopgap measure to allow a macro-heavy shader library to incrementally adopt `import`, but it has turned out to cause as many problems as it fixes (not least because users have never been able to form a good mental model around which kind of import to do when).
This change yanks support for the feature.
Diffstat (limited to 'source/slang/parser.cpp')
| -rw-r--r-- | source/slang/parser.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/source/slang/parser.cpp b/source/slang/parser.cpp index 531606f8d..538e5d576 100644 --- a/source/slang/parser.cpp +++ b/source/slang/parser.cpp @@ -835,24 +835,6 @@ namespace Slang return decl; } - static RefPtr<Decl> parsePoundImportDecl( - Parser* parser) - { - parser->haveSeenAnyImportDecls = true; - - Token importToken = parser->ReadToken(TokenType::PoundImport); - - NameLoc nameAndLoc; - nameAndLoc.name = getName(parser, importToken.Content); - nameAndLoc.loc = importToken.loc; - - auto decl = new ImportDecl(); - decl->moduleNameAndLoc = nameAndLoc; - decl->scope = parser->currentScope; - - return decl; - } - static NameLoc ParseDeclName( Parser* parser) { @@ -2592,13 +2574,6 @@ namespace Slang } break; - // The preprocessor will generate a custom token to represent - // the site of a `#import` directive, so that we can catch - // it downstream in the parser, here. - case TokenType::PoundImport: - decl = parsePoundImportDecl(parser); - break; - // If nothing else matched, we try to parse an "ordinary" declarator-based declaration default: decl = ParseDeclaratorDecl(parser, containerDecl); |
