commit 1111d3ad13b6e2af855b50c15bdbafcfc12b52c0 (tree)
parent 44aadaff591446c863a40d78e0c2deb1f56e736e
Author: Kelly Boothby <boothby@dwavesys.com>
Date: Mon, 30 Mar 2020 18:18:06 -0700
fixed bugs hitting EOF immediately after //, /// or //!
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git 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) {