[ruby/prism] Add comments documenting RangeNode fields
https://github.com/ruby/prism/commit/e6aef6499b
This commit is contained in:
parent
1e7d1da3b0
commit
d02455afc1
@ -2372,12 +2372,40 @@ nodes:
|
|||||||
- name: flags
|
- name: flags
|
||||||
type: flags
|
type: flags
|
||||||
kind: RangeFlags
|
kind: RangeFlags
|
||||||
|
comment: |
|
||||||
|
A flag indicating whether the range excludes the end value.
|
||||||
|
|
||||||
|
1..3 # includes 3
|
||||||
|
|
||||||
|
1...3 # excludes 3
|
||||||
- name: left
|
- name: left
|
||||||
type: node?
|
type: node?
|
||||||
|
comment: |
|
||||||
|
The left-hand side of the range, if present. Can be either `nil` or
|
||||||
|
a node representing any kind of expression that returns a non-void
|
||||||
|
value.
|
||||||
|
1...
|
||||||
|
^
|
||||||
|
|
||||||
|
hello...goodbye
|
||||||
|
^^^^^
|
||||||
- name: right
|
- name: right
|
||||||
type: node?
|
type: node?
|
||||||
|
The right-hand side of the range, if present. Can be either `nil` or
|
||||||
|
a node representing any kind of expression that returns a non-void
|
||||||
|
value.
|
||||||
|
|
||||||
|
..5
|
||||||
|
^
|
||||||
|
|
||||||
|
1...foo
|
||||||
|
^^^
|
||||||
|
If neither right-hand or left-hand side was included, this will be a
|
||||||
|
MissingNode.
|
||||||
- name: operator_loc
|
- name: operator_loc
|
||||||
type: location
|
type: location
|
||||||
|
comment: |
|
||||||
|
The location of the `..` or `...` operator.
|
||||||
comment: |
|
comment: |
|
||||||
Represents the use of the `..` or `...` operators.
|
Represents the use of the `..` or `...` operators.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user