parse.y: Fix the locations of NODE_BLOCK_PASS

* parse.y (arg_blk_pass): Update the first location of
    NODE_BLOCK_PASS if nd_head is assigned.

  e.g. The locations of NODE_BLOCK_PASS is fixed:

  ```
  a(1, &:to_s)
  ```

  * Before

  ```
  NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 5, last_lineno: 1, last_column: 11)
  ```

  * After

  ```
  NODE_BLOCK_PASS (line: 1, first_lineno: 1, first_column: 2, last_lineno: 1, last_column: 11)
  ```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yui-knk 2017-11-22 12:32:41 +00:00
Родитель 31b6079e17
Коммит b5ee316862
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -10698,6 +10698,8 @@ arg_blk_pass(NODE *node1, NODE *node2)
{
if (node2) {
node2->nd_head = node1;
nd_set_lineno(node2, nd_lineno(node1));
nd_set_column(node2, nd_column(node1));
return node2;
}
return node1;