diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-11-29 16:34:50 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-11-29 16:34:50 -0500 |
| commit | 91ef68f9b1121d2a08f175a81f88321664c90a61 (patch) | |
| tree | 73e2c9cf0b1f24b9855095757e65c4ac981517ef /src/c_tokenizer.cpp | |
| parent | 9a4da6c8d8d55f47609b8e900e9a4bb1ac34d5e7 (diff) | |
| parent | 70662830044418fc2d637c166fc100fe72d60fcf (diff) | |
| download | zig-91ef68f9b1121d2a08f175a81f88321664c90a61.tar.gz zig-91ef68f9b1121d2a08f175a81f88321664c90a61.zip | |
Merge remote-tracking branch 'origin/master' into llvm6
Diffstat (limited to 'src/c_tokenizer.cpp')
| -rw-r--r-- | src/c_tokenizer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/c_tokenizer.cpp b/src/c_tokenizer.cpp index 044831f72e..6be2cf991e 100644 --- a/src/c_tokenizer.cpp +++ b/src/c_tokenizer.cpp @@ -120,6 +120,7 @@ static void begin_token(CTokenize *ctok, CTokId id) { case CTokIdLParen: case CTokIdRParen: case CTokIdEOF: + case CTokIdDot: break; } } @@ -216,9 +217,8 @@ void tokenize_c_macro(CTokenize *ctok, const uint8_t *c) { buf_append_char(&ctok->buf, '0'); break; case '.': - begin_token(ctok, CTokIdNumLitFloat); - ctok->state = CTokStateFloat; - buf_init_from_str(&ctok->buf, "0."); + begin_token(ctok, CTokIdDot); + end_token(ctok); break; case '(': begin_token(ctok, CTokIdLParen); @@ -238,6 +238,8 @@ void tokenize_c_macro(CTokenize *ctok, const uint8_t *c) { break; case CTokStateFloat: switch (*c) { + case '.': + break; case 'e': case 'E': buf_append_char(&ctok->buf, 'e'); |
