From 67c857650c3c8fce4960d7a60443544189b0ac4a Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 9 Aug 2022 19:00:00 +0200 Subject: change comment syntax --- bootstrap/parse.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'bootstrap/parse.c') diff --git a/bootstrap/parse.c b/bootstrap/parse.c index 180ddea..b1c0371 100644 --- a/bootstrap/parse.c +++ b/bootstrap/parse.c @@ -98,12 +98,8 @@ eatspaces(struct parser *P) { for (;; chr(P)) { if (aisspace(chrpeek(P))) continue; - else if (chrpeek(P) == '!') { - while (chrpeek(P) != '\n' && chrpeek(P) != 0) - chr(P); - } else { + else break; - } } } @@ -437,7 +433,12 @@ lex(struct parser *P) { else tok.t = '*'; return tok; case '/': - if (chrmatch(P, '=')) tok.t = '/='; + if (chrmatch(P, '=')) tok.t = '/='; + else if (chrmatch(P, '/')) { + while ((c = chr(P)) != 0 && c != '\n') + ; + return lex(P); + } else tok.t = '/'; return tok; case '%': -- cgit v1.2.3