[ruby/prism] Add fields documentation for AliasMethodNode and AlternationPatternNode
https://github.com/ruby/prism/commit/6953daebde
This commit is contained in:
parent
1f431b63a2
commit
a73d80db41
@ -822,6 +822,17 @@ nodes:
|
|||||||
kind:
|
kind:
|
||||||
- SymbolNode
|
- SymbolNode
|
||||||
- InterpolatedSymbolNode
|
- InterpolatedSymbolNode
|
||||||
|
comment: |
|
||||||
|
Represents the new name of the method that will be aliased.
|
||||||
|
|
||||||
|
alias foo bar
|
||||||
|
^^^
|
||||||
|
|
||||||
|
alias :foo :bar
|
||||||
|
^^^^
|
||||||
|
|
||||||
|
alias :"#{foo}" :"#{bar}"
|
||||||
|
^^^^^^^^^
|
||||||
- name: old_name
|
- name: old_name
|
||||||
type: node
|
type: node
|
||||||
kind:
|
kind:
|
||||||
@ -829,6 +840,17 @@ nodes:
|
|||||||
- InterpolatedSymbolNode
|
- InterpolatedSymbolNode
|
||||||
- on error: GlobalVariableReadNode # alias a $b
|
- on error: GlobalVariableReadNode # alias a $b
|
||||||
- on error: MissingNode # alias a 42
|
- on error: MissingNode # alias a 42
|
||||||
|
comment: |
|
||||||
|
Represents the old name of the method that will be aliased.
|
||||||
|
|
||||||
|
alias foo bar
|
||||||
|
^^^
|
||||||
|
|
||||||
|
alias :foo :bar
|
||||||
|
^^^^
|
||||||
|
|
||||||
|
alias :"#{foo}" :"#{bar}"
|
||||||
|
^^^^^^^^^
|
||||||
- name: keyword_loc
|
- name: keyword_loc
|
||||||
type: location
|
type: location
|
||||||
comment: |
|
comment: |
|
||||||
@ -841,11 +863,26 @@ nodes:
|
|||||||
- name: left
|
- name: left
|
||||||
type: node
|
type: node
|
||||||
kind: pattern expression
|
kind: pattern expression
|
||||||
|
comment: |
|
||||||
|
Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
|
||||||
|
|
||||||
|
foo => bar | baz
|
||||||
|
^^^
|
||||||
- name: right
|
- name: right
|
||||||
type: node
|
type: node
|
||||||
kind: pattern expression
|
kind: pattern expression
|
||||||
|
comment: |
|
||||||
|
Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
|
||||||
|
|
||||||
|
foo => bar | baz
|
||||||
|
^^^
|
||||||
- name: operator_loc
|
- name: operator_loc
|
||||||
type: location
|
type: location
|
||||||
|
comment: |
|
||||||
|
Represents the alternation operator location.
|
||||||
|
|
||||||
|
foo => bar | baz
|
||||||
|
^
|
||||||
comment: |
|
comment: |
|
||||||
Represents an alternation pattern in pattern matching.
|
Represents an alternation pattern in pattern matching.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user