From 0212d5dc74fd65dc56e8710ee6291fefddf19aee Mon Sep 17 00:00:00 2001 From: yui-knk Date: Fri, 1 Dec 2017 06:32:59 +0000 Subject: 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 --- parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); %*/ -- cgit v1.2.3