diff options
| author | 2022-08-09 19:00:00 +0200 | |
|---|---|---|
| committer | 2022-08-09 19:00:00 +0200 | |
| commit | 67c857650c3c8fce4960d7a60443544189b0ac4a (patch) | |
| tree | fcfcfd96cd1254a4404a2011a258c21c0d9eb9f8 /bootstrap/parse.c | |
| parent | d0fc961eeb2cf69b50edc83aae90fcebc3a0677f (diff) | |
change comment syntax
Diffstat (limited to 'bootstrap/parse.c')
| -rw-r--r-- | bootstrap/parse.c | 13 |
1 files changed, 7 insertions, 6 deletions
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 '%': |