Skip to content

Commit 94a709c

Browse files
committed
Add field documentation for FindPatternNode
1 parent 56c7c78 commit 94a709c

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

config.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,27 +1882,81 @@ nodes:
18821882
fields:
18831883
- name: constant
18841884
type: node?
1885+
kind:
1886+
- ConstantPathNode
1887+
- ConstantReadNode
1888+
comment: |
1889+
Represents the optional constant preceding the pattern
1890+
1891+
foo in Foo(*bar, baz, *qux)
1892+
^^^
18851893
- name: left
18861894
type: node
1895+
comment: |
1896+
Represents the first wildcard node in the pattern.
1897+
1898+
foo in *bar, baz, *qux
1899+
^^^^
1900+
1901+
foo in Foo(*bar, baz, *qux)
1902+
^^^^
18871903
- name: requireds
18881904
type: node[]
1905+
comment: |
1906+
Represents the nodes in between the wildcards.
1907+
1908+
foo in *bar, baz, *qux
1909+
^^^
1910+
1911+
foo in Foo(*bar, baz, 1, *qux)
1912+
^^^^^^
18891913
- name: right
18901914
type: node
1915+
comment: |
1916+
Represents the second wildcard node in the pattern.
1917+
1918+
foo in *bar, baz, *qux
1919+
^^^^
1920+
1921+
foo in Foo(*bar, baz, *qux)
1922+
^^^^
18911923
- name: opening_loc
18921924
type: location?
1925+
comment: |
1926+
The location of the openingbrace.
1927+
1928+
foo in [*bar, baz, *qux]
1929+
^
1930+
1931+
foo in Foo(*bar, baz, *qux)
1932+
^
18931933
- name: closing_loc
18941934
type: location?
1935+
comment: |
1936+
The location of the closing brace.
1937+
1938+
foo in [*bar, baz, *qux]
1939+
^
1940+
1941+
foo in Foo(*bar, baz, *qux)
1942+
^
18951943
comment: |
18961944
Represents a find pattern in pattern matching.
18971945
18981946
foo in *bar, baz, *qux
18991947
^^^^^^^^^^^^^^^
19001948
1949+
foo in *bar, *qux
1950+
^^^^^^^^^^
1951+
19011952
foo in [*bar, baz, *qux]
19021953
^^^^^^^^^^^^^^^^^
19031954
19041955
foo in Foo(*bar, baz, *qux)
19051956
^^^^^^^^^^^^^^^^^^^^
1957+
1958+
foo => *bar, baz, *qux
1959+
^^^^^^^^^^^^^^^
19061960
- name: FlipFlopNode
19071961
fields:
19081962
- name: flags

0 commit comments

Comments
 (0)