diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-04-12 17:08:52 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-12 17:08:52 -0700 |
| commit | 021a4923f429278b1d7434e01cbf83edcdf43da4 (patch) | |
| tree | 7c3c5534de8a98c28554d36c41e3e3c1e1b48aee /source/slang/token-defs.h | |
| parent | baf194e7456ba4568dcf11249896af35b3ce18cc (diff) | |
Preprocessor cleanups (#484)
* For a `#error` or `#warning`, read the rest of the line as raw text to include in the error message
* When skipping tokens (e.g., in an `#ifdef`d out block), don't emit errors on invalid characters
* TODO: we could clearly get more efficient and skip whole raw lines in the future
* Fix an issue when a macro invocation that expands to nothing (zero tokens) is the last thing before a directive. The preprocessor was returning the `#` as an ordinary token, because it has already gone past its test for directives.
Diffstat (limited to 'source/slang/token-defs.h')
| -rw-r--r-- | source/slang/token-defs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/slang/token-defs.h b/source/slang/token-defs.h index 9edc1450d..a08084d85 100644 --- a/source/slang/token-defs.h +++ b/source/slang/token-defs.h @@ -29,6 +29,7 @@ TOKEN(WhiteSpace, "whitespace") TOKEN(NewLine, "newline") TOKEN(LineComment, "line comment") TOKEN(BlockComment, "block comment") +TOKEN(DirectiveMessage, "user-defined message") #define PUNCTUATION(id, text) \ TOKEN(id, "'" text "'") |
