diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-07-26 19:51:48 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-07-26 19:51:48 -0700 |
commit | 284f1483e649e017281fadce9dc9ed2e7d233bda (patch) | |
tree | f4bf2622ea505b80c53e7238cda2dadf6dd4d48f | |
parent | b7e3199c8eb1cd9371292c855db9cd30fbd3e407 (diff) | |
download | txr-284f1483e649e017281fadce9dc9ed2e7d233bda.tar.gz txr-284f1483e649e017281fadce9dc9ed2e7d233bda.tar.bz2 txr-284f1483e649e017281fadce9dc9ed2e7d233bda.zip |
parser: give start of a bad forms even if line 1.
* parser.y (parse): Emit the "while parsing form starting at
line N" even if N is 1. I think the idea here was supposed to
be to suppress this additional message for parses that don't
advance from the starting line, so I'm fixing it that way.
-rw-r--r-- | parser.y | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1908,9 +1908,12 @@ int parse(parser_t *parser, val name, enum prime_parser prim) uw_catch_end; - if (parser->errors && parser->syntax_tree == nil && start_line != 1) + if (parser->errors && parser->syntax_tree == nil && + parser->lineno != start_line) + { yyerrorf(parser->scanner, lit("while parsing form starting at line ~a"), num(start_line), nao); + } return res; } |