From 5fd08b506ca72bf496e36e44b98e588941e02721 Mon Sep 17 00:00:00 2001 From: Sanjay Karukamanna Date: Thu, 4 Jan 2024 00:52:10 +0000 Subject: [ruby/prism] Document `ArrayNode`, `SourceFileNode` fields https://github.com/ruby/prism/commit/0bdc566f67 --- prism/config.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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. -- cgit v1.2.3