summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parser.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/parser.y b/parser.y
index c2d809c9..78cdf9a0 100644
--- a/parser.y
+++ b/parser.y
@@ -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;
}