summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parse.y10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/parse.y b/src/parse.y
index 2bc78f577..9ffe6d33d 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -2976,12 +2976,16 @@ nextc(parser_state *p)
c = *p->s++;
}
if (c == '\n') {
- p->lineno++;
- p->column = 0;
+ if (p->nerr < 1) {
+ p->lineno++;
+ p->column = 0;
+ }
// must understand heredoc
}
else {
- p->column++;
+ if (p->nerr < 1) {
+ p->column++;
+ }
}
return c;
}