diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-01 06:32:59 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-01 06:32:59 +0000 |
commit | 0212d5dc74fd65dc56e8710ee6291fefddf19aee (patch) | |
tree | 411f4f5fba04e76945928f18bff11857416fc872 /parse.y | |
parent | c88c7d911f215ef581d0292e93bc38a11e9b7cd1 (diff) | |
download | ruby-0212d5dc74fd65dc56e8710ee6291fefddf19aee.tar.gz |
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
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); %*/ |