recognize the newline after a comment. this keeps the line number correct, and in interactive mode correctly prompts for more input. Reference: /n/sources/patch/maybe/acid-lex Date: Sun Sep 4 17:05:56 CES 2011 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/acid/lex.c Sun Sep 4 17:04:11 2011 +++ /sys/src/cmd/acid/lex.c Sun Sep 4 17:04:09 2011 @@ -329,6 +329,14 @@ case '\t': goto loop; + case '/': + c = lexc(); + if(c != '/'){ + unlexc(c); + return '/'; + } + eatnl(); + case '\n': line++; if(interactive == 0) @@ -390,15 +398,6 @@ return Tinc; unlexc(c); return '+'; - - case '/': - c = lexc(); - if(c == '/') { - eatnl(); - goto loop; - } - unlexc(c); - return '/'; case '\'': c = lexc();