only increment position, if no error has occured

This commit is contained in:
Frank Celler
2012-04-21 23:30:34 +02:00
parent 2b9ed5acd1
commit fc125524b2
+7 -3
View File
@@ -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;
}