diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-11-28 00:44:16 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-11-28 00:44:16 -0500 |
| commit | f537c51f2560564042da690e8fe3b6e85d9592c8 (patch) | |
| tree | 8c1570ea09a4978047bb45bd889f0f4dd989bb9c /src/c_tokenizer.cpp | |
| parent | 1ab84a27d374e666463c606dc1cd1c4972b52a74 (diff) | |
| parent | 57049b95b3fe183ea995f212b18e70212eaac23e (diff) | |
| download | zig-f537c51f2560564042da690e8fe3b6e85d9592c8.tar.gz zig-f537c51f2560564042da690e8fe3b6e85d9592c8.zip | |
Merge branch 'c-field-expr' of https://github.com/dimenus/zig into dimenus-c-field-expr
Diffstat (limited to 'src/c_tokenizer.cpp')
| -rw-r--r-- | src/c_tokenizer.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/c_tokenizer.cpp b/src/c_tokenizer.cpp index 044831f72e..e5322e2b0f 100644 --- a/src/c_tokenizer.cpp +++ b/src/c_tokenizer.cpp @@ -216,9 +216,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 +237,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'); |
