diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-02 03:00:13 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-02 03:00:13 +0000 |
| commit | 6e2ceaf0ed4812dfd8b1df4789c1dfd610e2de86 (patch) | |
| tree | 6843be90ba51f4341775badd35bf9024dde6fef2 /parse.y | |
| parent | 691b05e83c41d089c4f6c7a8bbac9dd63f36a144 (diff) | |
parse.y: code end position
* parse.y (parser_yyerror): use the given location as the end of
erred code, instead of the current position.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5378,7 +5378,7 @@ parser_yyerror(struct parser_params *parser, const YYLTYPE *yylloc, const char * } pt = (ruby_sourceline == yylloc->last_loc.lineno) ? - lex_p : lex_pend; + lex_pbeg + yylloc->last_loc.column : lex_pend; p = pe = pt < pend ? pt : pend; lim = p - lex_pbeg > max_line_margin ? p - max_line_margin : lex_pbeg; while ((lim < p) && (*(p-1) != '\n')) p--; |
