diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-11-06 22:41:12 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-11-06 22:41:12 -0500 |
| commit | 3a600297ca3f99ee57630c44900eec1fe7c92804 (patch) | |
| tree | 9642e53df266077c0ee76c1a045366f8f805fe95 /src/c_tokenizer.cpp | |
| parent | 4a82c2d124881512548254f5cdff3009b2f424df (diff) | |
| parent | 634e8713c394bacfe080d03256d1dd4f9a43dd8c (diff) | |
| download | zig-3a600297ca3f99ee57630c44900eec1fe7c92804.tar.gz zig-3a600297ca3f99ee57630c44900eec1fe7c92804.zip | |
Merge remote-tracking branch 'origin/master' into llvm6
Diffstat (limited to 'src/c_tokenizer.cpp')
| -rw-r--r-- | src/c_tokenizer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/c_tokenizer.cpp b/src/c_tokenizer.cpp index 00977e0f32..044831f72e 100644 --- a/src/c_tokenizer.cpp +++ b/src/c_tokenizer.cpp @@ -91,6 +91,9 @@ IDENT_START: \ case DIGIT +#define LINE_ENDING \ + '\r': \ + case '\n' static void begin_token(CTokenize *ctok, CTokId id) { assert(ctok->cur_tok == nullptr); @@ -191,7 +194,7 @@ void tokenize_c_macro(CTokenize *ctok, const uint8_t *c) { case '\\': ctok->state = CTokStateBackslash; break; - case '\n': + case LINE_ENDING: goto found_end_of_macro; case IDENT_START: ctok->state = CTokStateIdentifier; |
