[ruby/prism] Document ClassNode fields - Adds documentation for the fields of the ClassNode
. - Part of #2123
https://github.com/ruby/prism/commit/99615b43ac
This commit is contained in:
parent
34b407a4a8
commit
5f247416b6
@ -1828,6 +1828,11 @@ nodes:
|
|||||||
type: constant[]
|
type: constant[]
|
||||||
- name: class_keyword_loc
|
- name: class_keyword_loc
|
||||||
type: location
|
type: location
|
||||||
|
comment: |
|
||||||
|
Represents the location of the `class` keyword.
|
||||||
|
|
||||||
|
class Foo end
|
||||||
|
^^^^^
|
||||||
- name: constant_path
|
- name: constant_path
|
||||||
type: node
|
type: node
|
||||||
kind:
|
kind:
|
||||||
@ -1836,18 +1841,43 @@ nodes:
|
|||||||
- on error: CallNode # class 0.X end
|
- on error: CallNode # class 0.X end
|
||||||
- name: inheritance_operator_loc
|
- name: inheritance_operator_loc
|
||||||
type: location?
|
type: location?
|
||||||
|
comment: |
|
||||||
|
Represents the location of the `<` operator.
|
||||||
|
|
||||||
|
class Foo < Bar
|
||||||
|
^
|
||||||
- name: superclass
|
- name: superclass
|
||||||
type: node?
|
type: node?
|
||||||
kind: non-void expression
|
kind: non-void expression
|
||||||
|
comment: |
|
||||||
|
Represents the superclass of the class.
|
||||||
|
|
||||||
|
class Foo < Bar
|
||||||
|
^^^
|
||||||
- name: body
|
- name: body
|
||||||
type: node?
|
type: node?
|
||||||
kind:
|
kind:
|
||||||
- StatementsNode
|
- StatementsNode
|
||||||
- BeginNode
|
- BeginNode
|
||||||
|
comment: |
|
||||||
|
Represents the body of the class.
|
||||||
|
|
||||||
|
class Foo
|
||||||
|
foo
|
||||||
|
^^^
|
||||||
- name: end_keyword_loc
|
- name: end_keyword_loc
|
||||||
type: location
|
type: location
|
||||||
|
comment: |
|
||||||
|
Represents the location of the `end` keyword.
|
||||||
|
|
||||||
|
class Foo end
|
||||||
|
^^^
|
||||||
- name: name
|
- name: name
|
||||||
type: constant
|
type: constant
|
||||||
|
comment: |
|
||||||
|
The name of the class.
|
||||||
|
|
||||||
|
class Foo end # name `:Foo`
|
||||||
comment: |
|
comment: |
|
||||||
Represents a class declaration involving the `class` keyword.
|
Represents a class declaration involving the `class` keyword.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user