summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Healy <matthew@liamhealy.xyz>2024-01-07 10:26:21 +0100
committergit <svn-admin@ruby-lang.org>2024-01-08 18:47:05 +0000
commit7e09dd433b2230c6bf4158a5157c14246510b746 (patch)
treeaabcb31db776c9b29090350a5e7cf72bde64b91e
parenta0eecfb5bae66470ccf40e27b9193fbf5c76618f (diff)
[ruby/prism] Add comments for HashNode fields
https://github.com/ruby/prism/commit/649e209519
-rw-r--r--prism/config.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/prism/config.yml b/prism/config.yml
index 85785a768c..85fe563c23 100644
--- a/prism/config.yml
+++ b/prism/config.yml
@@ -1455,10 +1455,28 @@ nodes:
fields:
- name: opening_loc
type: location
+ comment: |
+ The location of the opening brace.
+
+ { a => b }
+ ^
- name: elements
type: node[]
+ comment: |
+ The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s.
+
+ { a: b }
+ ^^^^
+
+ { **foo }
+ ^^^^^
- name: closing_loc
type: location
+ comment: |
+ The location of the closing brace.
+
+ { a => b }
+ ^
comment: |
Represents a hash literal.