summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lexer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lexer.c b/lexer.c
index f8a6ae1..dd6888e 100644
--- a/lexer.c
+++ b/lexer.c
@@ -74,7 +74,11 @@ lexline(InputStream *input, int toplevel)
else
stmt->next = lexline(input, toplevel);
goto end;
- case L'⍝': goto end;
+ case L'⍝':
+ while(peek != '\n' && !inputEOF(input))
+ peek = getrune(input);
+ ungetrune(input);
+ goto end;
case L'⍬':
stmt->toks[stmt->ntoks].tag = ArrayTag;
stmt->toks[stmt->ntoks].array = allocarray(AtypeInt, 1, 0);