Skip to content

Commit 9b6df7a

Browse files
committed
Add field documentation for FindPatternNode
1 parent f5c91f4 commit 9b6df7a

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

config.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,27 +1881,81 @@ nodes:
18811881
fields:
18821882
- name: constant
18831883
type: node?
1884+
kind:
1885+
- ConstantPathNode
1886+
- ConstantReadNode
1887+
comment: |
1888+
Represents the optional constant preceding the pattern
1889+
1890+
foo in Foo(*bar, baz, *qux)
1891+
^^^
18841892
- name: left
18851893
type: node
1894+
comment: |
1895+
Represents the first wildcard node in the pattern.
1896+
1897+
foo in *bar, baz, *qux
1898+
^^^^
1899+
1900+
foo in Foo(*bar, baz, *qux)
1901+
^^^^
18861902
- name: requireds
18871903
type: node[]
1904+
comment: |
1905+
Represents the nodes in between the wildcards.
1906+
1907+
foo in *bar, baz, *qux
1908+
^^^
1909+
1910+
foo in Foo(*bar, baz, 1, *qux)
1911+
^^^^^^
18881912
- name: right
18891913
type: node
1914+
comment: |
1915+
Represents the second wildcard node in the pattern.
1916+
1917+
foo in *bar, baz, *qux
1918+
^^^^
1919+
1920+
foo in Foo(*bar, baz, *qux)
1921+
^^^^
18901922
- name: opening_loc
18911923
type: location?
1924+
comment: |
1925+
The location of the openingbrace.
1926+
1927+
foo in [*bar, baz, *qux]
1928+
^
1929+
1930+
foo in Foo(*bar, baz, *qux)
1931+
^
18921932
- name: closing_loc
18931933
type: location?
1934+
comment: |
1935+
The location of the closing brace.
1936+
1937+
foo in [*bar, baz, *qux]
1938+
^
1939+
1940+
foo in Foo(*bar, baz, *qux)
1941+
^
18941942
comment: |
18951943
Represents a find pattern in pattern matching.
18961944
18971945
foo in *bar, baz, *qux
18981946
^^^^^^^^^^^^^^^
18991947
1948+
foo in *bar, *qux
1949+
^^^^^^^^^^
1950+
19001951
foo in [*bar, baz, *qux]
19011952
^^^^^^^^^^^^^^^^^
19021953
19031954
foo in Foo(*bar, baz, *qux)
19041955
^^^^^^^^^^^^^^^^^^^^
1956+
1957+
foo => *bar, baz, *qux
1958+
^^^^^^^^^^^^^^^
19051959
- name: FlipFlopNode
19061960
fields:
19071961
- name: flags

0 commit comments

Comments
 (0)