aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-01 06:32:59 +0000
committeryui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-01 06:32:59 +0000
commit0212d5dc74fd65dc56e8710ee6291fefddf19aee (patch)
tree411f4f5fba04e76945928f18bff11857416fc872
parentc88c7d911f215ef581d0292e93bc38a11e9b7cd1 (diff)
downloadruby-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
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 8c41c31330..109fe23906 100644
--- a/parse.y
+++ b/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);
%*/