diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-06-26 13:47:08 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-26 13:47:08 -0700 |
| commit | 0259ddb0a72d3b12278404847f6e30b63e97cfc3 (patch) | |
| tree | d73c230a8b2ddc06e0fa978945aa8a838b189236 /source/slang/parser.cpp | |
| parent | 3f316dcbd9274efc74f817cf36f17a511ff2e21e (diff) | |
| parent | f6cb66feab3439f41ca87cb307f69b49654883ab (diff) | |
Merge pull request #43 from tfoleyNV/import-macros
Add support for `#import`
Diffstat (limited to 'source/slang/parser.cpp')
| -rw-r--r-- | source/slang/parser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/parser.cpp b/source/slang/parser.cpp index 0598e67a7..61d7b225d 100644 --- a/source/slang/parser.cpp +++ b/source/slang/parser.cpp @@ -805,10 +805,10 @@ namespace Slang return decl; } - static RefPtr<Decl> parseAutoImportDecl( + static RefPtr<Decl> parsePoundImportDecl( Parser* parser) { - Token importToken = parser->ReadToken(TokenType::AutoImport); + Token importToken = parser->ReadToken(TokenType::PoundImport); auto decl = new ImportDecl(); decl->nameToken = importToken; @@ -2186,8 +2186,8 @@ namespace Slang decl = parseModifierDecl(parser); else if(parser->LookAheadToken("__import")) decl = parseImportDecl(parser); - else if(parser->LookAheadToken(TokenType::AutoImport)) - decl = parseAutoImportDecl(parser); + else if(parser->LookAheadToken(TokenType::PoundImport)) + decl = parsePoundImportDecl(parser); else if (AdvanceIf(parser, TokenType::Semicolon)) { decl = new EmptyDecl(); |
