Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document ConstantPathNode fields #2140

Merged
merged 5 commits into from
Apr 23, 2024
Merged
Changes from 3 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
33 changes: 33 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1378,13 +1378,46 @@ nodes:
fields:
- name: parent
type: node?
comment: |
The left-hand node of the path, if present. Can be `nil` or any kind
of a node returning a non-void value. Will be missing when constant
lookup is at the root of the module tree.
kddnewton marked this conversation as resolved.
Show resolved Hide resolved

Foo::Bar
^^^

self::Test
^^^^

a.b::C
^^^
- name: child
type: node
kind:
- ConstantReadNode
- MissingNode
comment: |
The right-hand node of the path. Always a `ConstantReadNode` in a
valid Ruby syntax tree.

::Foo
^^^

self::Test
^^^^

a.b::C
^
- name: delimiter_loc
type: location
comment: |
The location of the `::` delimiter.

::Foo
^^

One::Two
^^
comment: |
Represents accessing a constant through a path of `::` operators.

Expand Down
Loading