mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parse.y: Fix a location of hash keys
* parse.y: Use @1 to only include a range of tLABEL. e.g. The locations of the NODE_LIT(:b) is fixed: ``` a(1, b: 10) ``` * Before ``` NODE_LIT (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 10) ``` * After ``` NODE_LIT (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 7) ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c88c7d911f
commit
0212d5dc74
1 changed files with 1 additions and 1 deletions
2
parse.y
2
parse.y
|
@ -4983,7 +4983,7 @@ assoc : arg_value tASSOC arg_value
|
|||
| tLABEL arg_value
|
||||
{
|
||||
/*%%%*/
|
||||
$$ = list_append(new_list(new_lit(ID2SYM($1), &@$), &@$), $2, &@$);
|
||||
$$ = list_append(new_list(new_lit(ID2SYM($1), &@1), &@$), $2, &@$);
|
||||
/*%
|
||||
$$ = dispatch2(assoc_new, $1, $2);
|
||||
%*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue