mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
only increment position, if no error has occured
This commit is contained in:
+7
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user