[ruby/prism] Review config.yml: documentation, types and field names
https://github.com/ruby/prism/commit/d43333539e
This commit is contained in:
parent
7c9bcdf397
commit
d6764076a1
@ -774,15 +774,25 @@ nodes:
|
|||||||
fields:
|
fields:
|
||||||
- name: new_name
|
- name: new_name
|
||||||
type: node
|
type: node
|
||||||
|
kind:
|
||||||
|
- GlobalVariableReadNode
|
||||||
|
- BackReferenceReadNode
|
||||||
|
- NumberedReferenceReadNode
|
||||||
comment: |
|
comment: |
|
||||||
Represents the new name of the global variable that can be used after aliasing. This can be either a global variable, a back reference, or a numbered reference.
|
Represents the new name of the global variable that can be used after aliasing.
|
||||||
|
|
||||||
alias $foo $bar
|
alias $foo $bar
|
||||||
^^^^
|
^^^^
|
||||||
- name: old_name
|
- name: old_name
|
||||||
type: node
|
type: node
|
||||||
|
kind:
|
||||||
|
- GlobalVariableReadNode
|
||||||
|
- BackReferenceReadNode
|
||||||
|
- NumberedReferenceReadNode
|
||||||
|
- SymbolNode # On parsing error of `alias $a b`
|
||||||
|
- MissingNode # On parsing error of `alias $a 42`
|
||||||
comment: |
|
comment: |
|
||||||
Represents the old name of the global variable that could be used before aliasing. This can be either a global variable, a back reference, or a numbered reference.
|
Represents the old name of the global variable that can be used before aliasing.
|
||||||
|
|
||||||
alias $foo $bar
|
alias $foo $bar
|
||||||
^^^^
|
^^^^
|
||||||
@ -802,8 +812,16 @@ nodes:
|
|||||||
fields:
|
fields:
|
||||||
- name: new_name
|
- name: new_name
|
||||||
type: node
|
type: node
|
||||||
|
kind:
|
||||||
|
- SymbolNode
|
||||||
|
- InterpolatedSymbolNode
|
||||||
- name: old_name
|
- name: old_name
|
||||||
type: node
|
type: node
|
||||||
|
kind:
|
||||||
|
- SymbolNode
|
||||||
|
- InterpolatedSymbolNode
|
||||||
|
- GlobalVariableReadNode # On parsing error of `alias a $b`
|
||||||
|
- MissingNode # On parsing error of `alias a 42`
|
||||||
- name: keyword_loc
|
- name: keyword_loc
|
||||||
type: location
|
type: location
|
||||||
comment: |
|
comment: |
|
||||||
@ -1034,7 +1052,7 @@ nodes:
|
|||||||
- name: operator_loc
|
- name: operator_loc
|
||||||
type: location
|
type: location
|
||||||
comment: |
|
comment: |
|
||||||
Represents block method arguments.
|
Represents a block argument using `&`.
|
||||||
|
|
||||||
bar(&args)
|
bar(&args)
|
||||||
^^^^^^^^^^
|
^^^^^^^^^^
|
||||||
@ -1054,8 +1072,15 @@ nodes:
|
|||||||
type: constant[]
|
type: constant[]
|
||||||
- name: parameters
|
- name: parameters
|
||||||
type: node?
|
type: node?
|
||||||
|
kind:
|
||||||
|
- BlockParametersNode
|
||||||
|
- NumberedParametersNode
|
||||||
|
- ItParametersNode
|
||||||
- name: body
|
- name: body
|
||||||
type: node?
|
type: node?
|
||||||
|
kind:
|
||||||
|
- StatementsNode
|
||||||
|
- BeginNode
|
||||||
- name: opening_loc
|
- name: opening_loc
|
||||||
type: location
|
type: location
|
||||||
- name: closing_loc
|
- name: closing_loc
|
||||||
@ -1075,7 +1100,7 @@ nodes:
|
|||||||
- name: operator_loc
|
- name: operator_loc
|
||||||
type: location
|
type: location
|
||||||
comment: |
|
comment: |
|
||||||
Represents a block parameter to a method, block, or lambda definition.
|
Represents a block parameter of a method, block, or lambda definition.
|
||||||
|
|
||||||
def a(&b)
|
def a(&b)
|
||||||
^^
|
^^
|
||||||
@ -2164,6 +2189,9 @@ nodes:
|
|||||||
end
|
end
|
||||||
- name: consequent
|
- name: consequent
|
||||||
type: node?
|
type: node?
|
||||||
|
kind:
|
||||||
|
- ElseNode
|
||||||
|
- IfNode
|
||||||
comment: |
|
comment: |
|
||||||
Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement.
|
Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user