aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-05-09 10:01:10 +0100
committerGinger Bill <bill@gingerbill.org>2017-05-09 10:01:10 +0100
commit64b5afd82096f3e9dfde125a8846d606db7c85fb (patch)
tree3771f57ca8afc6420ce11a219f0cb31108b0eb81 /src/tokenizer.c
parent7692061eef48765ac51b8a8f3024491381fdf182 (diff)
Fix issue #63 for block comments not terminating at an EOF
Diffstat (limited to 'src/tokenizer.c')
-rw-r--r--src/tokenizer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tokenizer.c b/src/tokenizer.c
index 9dcade195..bc979a784 100644
--- a/src/tokenizer.c
+++ b/src/tokenizer.c
@@ -909,7 +909,9 @@ Token tokenizer_get_token(Tokenizer *t) {
isize comment_scope = 1;
advance_to_next_rune(t);
while (comment_scope > 0) {
- if (t->curr_rune == '/') {
+ if (t->curr_rune == GB_RUNE_EOF) {
+ break;
+ } else if (t->curr_rune == '/') {
advance_to_next_rune(t);
if (t->curr_rune == '*') {
advance_to_next_rune(t);