diff options
| author | Kelly Boothby <boothby@dwavesys.com> | 2020-03-30 18:18:06 -0700 |
|---|---|---|
| committer | Kelly Boothby <boothby@dwavesys.com> | 2020-03-30 18:30:03 -0700 |
| commit | 1111d3ad13b6e2af855b50c15bdbafcfc12b52c0 (patch) | |
| tree | 8a7747771566e5f71123374685a5ae006c927552 /src/tokenizer.cpp | |
| parent | 44aadaff591446c863a40d78e0c2deb1f56e736e (diff) | |
| download | zig-1111d3ad13b6e2af855b50c15bdbafcfc12b52c0.tar.gz zig-1111d3ad13b6e2af855b50c15bdbafcfc12b52c0.zip | |
fixed bugs hitting EOF immediately after //, /// or //!
Diffstat (limited to 'src/tokenizer.cpp')
| -rw-r--r-- | src/tokenizer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index 22d63568bf..b4e9d910d9 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -1494,9 +1494,17 @@ void tokenize(Buf *buf, Tokenization *out) { tokenize_error(&t, "unexpected EOF"); break; case TokenizeStateLineComment: + break; case TokenizeStateSawSlash2: + cancel_token(&t); + break; case TokenizeStateSawSlash3: + set_token_id(&t, t.cur_tok, TokenIdDocComment); + end_token(&t); + break; case TokenizeStateSawSlashBang: + set_token_id(&t, t.cur_tok, TokenIdContainerDocComment); + end_token(&t); break; } if (t.state != TokenizeStateError) { |
