diff options
| author | gingerBill <bill@gingerbill.org> | 2021-09-06 20:15:59 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-09-06 20:15:59 +0100 |
| commit | 0434281f734db10ff17b68395e593d4a07b03d8d (patch) | |
| tree | e4f4ceaa09f7114121ef67215780206959245c65 /src/parser.cpp | |
| parent | 3bf005bfc553ba59d1869c8eab66123748af0b00 (diff) | |
Strip semicolons; Make `odin strip-semicolon` replace `..` with `..=` if used as a binary operator
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 4433a0a7f..778afbcd6 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -1376,6 +1376,10 @@ Token expect_operator(AstFile *f) { syntax_error(f->curr_token, "Expected an non-range operator, got '%.*s'", LIT(p)); } + if (f->curr_token.kind == Token_Ellipsis) { + f->tokens[f->curr_token_index].flags |= TokenFlag_Replace; + } + advance_token(f); return prev; } |