Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1132,21 +1132,50 @@ nodes:
fields:
- name: locals
type: constant[]
comment: |
The local variables declared in the block.

[1, 2, 3].each { |i| puts x } # locals: [:i]
^
- name: parameters
type: node?
kind:
- BlockParametersNode
- NumberedParametersNode
- ItParametersNode
comment: |
The parameters of the block.

[1, 2, 3].each { |i| puts x }
^^^
[1, 2, 3].each { puts _1 }
^^^^^^^^^^^
[1, 2, 3].each { puts it }
^^^^^^^^^^^
- name: body
type: node?
kind:
- StatementsNode
- BeginNode
comment: |
The body of the block.

[1, 2, 3].each { |i| puts x }
^^^^^^
- name: opening_loc
type: location
comment: |
Represents the location of the opening `|`.

[1, 2, 3].each { |i| puts x }
^
- name: closing_loc
type: location
comment: |
Represents the location of the closing `|`.

[1, 2, 3].each { |i| puts x }
^
comment: |
Represents a block of ruby code.

Expand Down