Skip to content

Commit 145ae8f

Browse files
committed
Add document CallNode fields
Partially fixes: #2123
1 parent 93c0474 commit 145ae8f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

config.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,22 +1253,59 @@ nodes:
12531253
^^^
12541254
- name: call_operator_loc
12551255
type: location?
1256+
comment: |
1257+
Represents the location of the call operator.
1258+
1259+
foo.bar
1260+
^
1261+
1262+
foo&.bar
1263+
^^
12561264
- name: name
12571265
type: constant
1266+
comment: |
1267+
Represents the name of the method being called.
1268+
1269+
foo.bar # name `:foo`
1270+
^^^
12581271
- name: message_loc
12591272
type: location?
1273+
comment: |
1274+
Represents the location of the message.
1275+
1276+
foo.bar
1277+
^^^
12601278
- name: opening_loc
12611279
type: location?
1280+
comment: |
1281+
Represents the location of the left parenthesis.
1282+
foo(bar)
1283+
^
12621284
- name: arguments
12631285
type: node?
12641286
kind: ArgumentsNode
1287+
comment: |
1288+
Represents the arguments to the method call. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
1289+
1290+
foo(bar)
1291+
^^^
12651292
- name: closing_loc
12661293
type: location?
1294+
comment: |
1295+
Represents the location of the right parenthesis.
1296+
1297+
foo(bar)
1298+
^
12671299
- name: block
12681300
type: node?
12691301
kind:
12701302
- BlockNode
12711303
- BlockArgumentNode
1304+
comment: |
1305+
Represents the block that is being passed to the method.
1306+
1307+
foo { |a| a }
1308+
^^^^^^^^^
12721309
comment: |
12731310
Represents a method call, in all of the various forms that can take.
12741311

0 commit comments

Comments
 (0)