diff options
| author | Sanjay Karukamanna <work@sanjay.link> | 2024-01-04 00:52:10 +0000 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-04-23 13:13:29 +0000 |
| commit | 5fd08b506ca72bf496e36e44b98e588941e02721 (patch) | |
| tree | 5393ca648a412883c3b25542d7549e852e97c9c3 | |
| parent | dae59003050adaf0666c7dc0d03ba7633c46c8bb (diff) | |
[ruby/prism] Document `ArrayNode`, `SourceFileNode` fields
https://github.com/ruby/prism/commit/0bdc566f67
| -rw-r--r-- | prism/config.yml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/prism/config.yml b/prism/config.yml index f59c03ff37..e8b4f4ec64 100644 --- a/prism/config.yml +++ b/prism/config.yml @@ -828,10 +828,25 @@ nodes: kind: ArrayNodeFlags - name: elements type: node[] + comment: Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array. - name: opening_loc type: location? + comment: | + Represents the optional source location for the opening token. + + [1,2,3] # "[" + %w[foo bar baz] # "%w[" + %I(apple orange banana) # "%I(" + foo = 1, 2, 3 # nil - name: closing_loc type: location? + comment: | + Represents the optional source location for the closing token. + + [1,2,3] # "]" + %w[foo bar baz] # "]" + %I(apple orange banana) # ")" + foo = 1, 2, 3 # nil comment: | Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. @@ -3169,6 +3184,7 @@ nodes: kind: StringFlags - name: filepath type: string + comment: Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. comment: | Represents the use of the `__FILE__` keyword. |
