diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-05-28 15:51:07 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-05-28 15:51:07 +0900 |
| commit | dae33d3f660e598c95b7c9feb67f5716227607ce (patch) | |
| tree | 60f5c7362ad1437edf18d97f20bdcfc8311ebb33 /src | |
| parent | cf8f429624e6c2e75cbd146e548dd1ca62930149 (diff) | |
| download | mruby-dae33d3f660e598c95b7c9feb67f5716227607ce.tar.gz mruby-dae33d3f660e598c95b7c9feb67f5716227607ce.zip | |
column position adjustment was wrong
Diffstat (limited to 'src')
| -rw-r--r-- | src/parse.y | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/parse.y b/src/parse.y index 2d7003f62..55c82c12d 100644 --- a/src/parse.y +++ b/src/parse.y @@ -3405,7 +3405,7 @@ parse_qstring(parser_state *p, int term) switch (c) { case '\n': p->lineno++; - p->column = 1; + p->column = 0; continue; case '\\': @@ -3474,7 +3474,7 @@ parser_yylex(parser_state *p) /* fall through */ case '\n': p->lineno++; - p->column = 1; + p->column = 0; switch (p->lstate) { case EXPR_BEG: case EXPR_FNAME: @@ -3569,8 +3569,8 @@ parser_yylex(parser_state *p) if (p->column == 1) { if (peeks(p, "begin\n")) { skips(p, "\n=end\n"); + goto retry; } - goto retry; } switch (p->lstate) { case EXPR_FNAME: case EXPR_DOT: @@ -4263,7 +4263,7 @@ parser_yylex(parser_state *p) c = nextc(p); if (c == '\n') { p->lineno++; - p->column = 1; + p->column = 0; space_seen = 1; goto retry; /* skip \\n */ } @@ -4699,7 +4699,7 @@ mrb_parser_new(mrb_state *mrb) p->capture_errors = 0; p->lineno = 1; - p->column = 1; + p->column = 0; #if defined(PARSER_TEST) || defined(PARSER_DEBUG) yydebug = 1; #endif @@ -4722,7 +4722,7 @@ mrb_parser_lineno(struct mrb_parser_state *p, int n) if (n <= 0) { return p->lineno; } - p->column = 1; + p->column = 0; p->lineno = n; return n; } |
