diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2017-07-11 12:41:05 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-11 12:41:05 -0700 |
| commit | a60dd57e5ac0d3cc43fddf62dbf72677d377121f (patch) | |
| tree | 2e4911b6da6573d334117a08130be5c945c31b15 /source/slang/preprocessor.cpp | |
| parent | 98b3e5bc95b6de081885798840c2deb79905a68f (diff) | |
| parent | bd7105ff8683a680d1270eca8cd74f9002144dbd (diff) | |
Merge pull request #72 from tfoleyNV/resources-in-structs
Resources in structs
Diffstat (limited to 'source/slang/preprocessor.cpp')
| -rw-r--r-- | source/slang/preprocessor.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/slang/preprocessor.cpp b/source/slang/preprocessor.cpp index a186ce201..a4cccf4f4 100644 --- a/source/slang/preprocessor.cpp +++ b/source/slang/preprocessor.cpp @@ -1921,6 +1921,9 @@ static Token ReadToken(Preprocessor* preprocessor) { // Look at the next raw token in the input. Token const& token = PeekRawToken(preprocessor); + if (token.Type == TokenType::EndOfFile) + return token; + // If we have a directive (`#` at start of line) then handle it if ((token.Type == TokenType::Pound) && (token.flags & TokenFlag::AtStartOfLine)) @@ -1980,7 +1983,7 @@ static void FinalizePreprocessor( while (input) { PreprocessorInputStream* parent = input->parent; - DestroyInputStream(preprocessor, input); + EndInputStream(preprocessor, input); input = parent; } |
