aboutsummaryrefslogtreecommitdiffstats
path: root/test/prism
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-12-13 21:35:42 -0500
committergit <svn-admin@ruby-lang.org>2023-12-14 02:43:32 +0000
commitb7e89d4b175a88be333134066b595d1e34c33fd3 (patch)
tree4967eb17940cd97d13616457c7158af7cb0fa75d /test/prism
parent74b6e70ef4cf1e625ff968ebf3e62dc9a0760ac1 (diff)
downloadruby-b7e89d4b175a88be333134066b595d1e34c33fd3.tar.gz
[ruby/prism] Fix hash pattern rest
https://github.com/ruby/prism/commit/43c4232cfc
Diffstat (limited to 'test/prism')
-rw-r--r--test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt38
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_058.txt36
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_058_2.txt28
-rw-r--r--test/prism/snapshots/seattlerb/parse_pattern_076.txt34
4 files changed, 68 insertions, 68 deletions
diff --git a/test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt b/test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt
index e218788cdc..bfdfa90505 100644
--- a/test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt
+++ b/test/prism/snapshots/seattlerb/case_in_hash_pat_rest.txt
@@ -16,27 +16,27 @@
│ ├── pattern:
│ │ @ HashPatternNode (location: (2,3)-(2,15))
│ │ ├── constant: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ AssocNode (location: (2,3)-(2,7))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (2,3)-(2,5))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (2,3)-(2,4) = "b"
- │ │ │ │ │ ├── closing_loc: (2,4)-(2,5) = ":"
- │ │ │ │ │ └── unescaped: "b"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ LocalVariableTargetNode (location: (2,6)-(2,7))
- │ │ │ │ │ ├── name: :c
- │ │ │ │ │ └── depth: 0
- │ │ │ │ └── operator_loc: ∅
- │ │ │ └── @ AssocSplatNode (location: (2,9)-(2,15))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,3)-(2,7))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,3)-(2,5))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,3)-(2,4) = "b"
+ │ │ │ │ ├── closing_loc: (2,4)-(2,5) = ":"
+ │ │ │ │ └── unescaped: "b"
│ │ │ ├── value:
- │ │ │ │ @ LocalVariableTargetNode (location: (2,11)-(2,15))
- │ │ │ │ ├── name: :rest
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,6)-(2,7))
+ │ │ │ │ ├── name: :c
│ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: (2,9)-(2,11) = "**"
- │ │ ├── rest: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest:
+ │ │ │ @ AssocSplatNode (location: (2,9)-(2,15))
+ │ │ │ ├── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,11)-(2,15))
+ │ │ │ │ ├── name: :rest
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: (2,9)-(2,11) = "**"
│ │ ├── opening_loc: ∅
│ │ └── closing_loc: ∅
│ ├── statements:
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_058.txt b/test/prism/snapshots/seattlerb/parse_pattern_058.txt
index b4a1b2650b..d372ece2d4 100644
--- a/test/prism/snapshots/seattlerb/parse_pattern_058.txt
+++ b/test/prism/snapshots/seattlerb/parse_pattern_058.txt
@@ -26,24 +26,24 @@
│ ├── pattern:
│ │ @ HashPatternNode (location: (2,3)-(2,15))
│ │ ├── constant: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ AssocNode (location: (2,4)-(2,6))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
- │ │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ ├── value: ∅
- │ │ │ │ └── operator_loc: ∅
- │ │ │ └── @ AssocSplatNode (location: (2,8)-(2,14))
- │ │ │ ├── value:
- │ │ │ │ @ LocalVariableTargetNode (location: (2,10)-(2,14))
- │ │ │ │ ├── name: :rest
- │ │ │ │ └── depth: 0
- │ │ │ └── operator_loc: (2,8)-(2,10) = "**"
- │ │ ├── rest: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,4)-(2,6))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
+ │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest:
+ │ │ │ @ AssocSplatNode (location: (2,8)-(2,14))
+ │ │ │ ├── value:
+ │ │ │ │ @ LocalVariableTargetNode (location: (2,10)-(2,14))
+ │ │ │ │ ├── name: :rest
+ │ │ │ │ └── depth: 0
+ │ │ │ └── operator_loc: (2,8)-(2,10) = "**"
│ │ ├── opening_loc: (2,3)-(2,4) = "{"
│ │ └── closing_loc: (2,14)-(2,15) = "}"
│ ├── statements:
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt b/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt
index f6625efc69..b75b198907 100644
--- a/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt
+++ b/test/prism/snapshots/seattlerb/parse_pattern_058_2.txt
@@ -26,21 +26,21 @@
│ ├── pattern:
│ │ @ HashPatternNode (location: (2,3)-(2,11))
│ │ ├── constant: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ AssocNode (location: (2,4)-(2,6))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
- │ │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ ├── value: ∅
- │ │ │ │ └── operator_loc: ∅
- │ │ │ └── @ AssocSplatNode (location: (2,8)-(2,10))
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,4)-(2,6))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
+ │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
+ │ │ │ │ └── unescaped: "a"
│ │ │ ├── value: ∅
- │ │ │ └── operator_loc: (2,8)-(2,10) = "**"
- │ │ ├── rest: ∅
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest:
+ │ │ │ @ AssocSplatNode (location: (2,8)-(2,10))
+ │ │ │ ├── value: ∅
+ │ │ │ └── operator_loc: (2,8)-(2,10) = "**"
│ │ ├── opening_loc: (2,3)-(2,4) = "{"
│ │ └── closing_loc: (2,10)-(2,11) = "}"
│ ├── statements:
diff --git a/test/prism/snapshots/seattlerb/parse_pattern_076.txt b/test/prism/snapshots/seattlerb/parse_pattern_076.txt
index 7cf05ddad4..8f4ef571c7 100644
--- a/test/prism/snapshots/seattlerb/parse_pattern_076.txt
+++ b/test/prism/snapshots/seattlerb/parse_pattern_076.txt
@@ -26,23 +26,23 @@
│ ├── pattern:
│ │ @ HashPatternNode (location: (2,3)-(2,16))
│ │ ├── constant: ∅
- │ │ ├── elements: (length: 2)
- │ │ │ ├── @ AssocNode (location: (2,4)-(2,8))
- │ │ │ │ ├── key:
- │ │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
- │ │ │ │ │ ├── flags: ∅
- │ │ │ │ │ ├── opening_loc: ∅
- │ │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
- │ │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
- │ │ │ │ │ └── unescaped: "a"
- │ │ │ │ ├── value:
- │ │ │ │ │ @ IntegerNode (location: (2,7)-(2,8))
- │ │ │ │ │ └── flags: decimal
- │ │ │ │ └── operator_loc: ∅
- │ │ │ └── @ NoKeywordsParameterNode (location: (2,10)-(2,15))
- │ │ │ ├── operator_loc: (2,10)-(2,12) = "**"
- │ │ │ └── keyword_loc: (2,12)-(2,15) = "nil"
- │ │ ├── rest: ∅
+ │ │ ├── elements: (length: 1)
+ │ │ │ └── @ AssocNode (location: (2,4)-(2,8))
+ │ │ │ ├── key:
+ │ │ │ │ @ SymbolNode (location: (2,4)-(2,6))
+ │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── opening_loc: ∅
+ │ │ │ │ ├── value_loc: (2,4)-(2,5) = "a"
+ │ │ │ │ ├── closing_loc: (2,5)-(2,6) = ":"
+ │ │ │ │ └── unescaped: "a"
+ │ │ │ ├── value:
+ │ │ │ │ @ IntegerNode (location: (2,7)-(2,8))
+ │ │ │ │ └── flags: decimal
+ │ │ │ └── operator_loc: ∅
+ │ │ ├── rest:
+ │ │ │ @ NoKeywordsParameterNode (location: (2,10)-(2,15))
+ │ │ │ ├── operator_loc: (2,10)-(2,12) = "**"
+ │ │ │ └── keyword_loc: (2,12)-(2,15) = "nil"
│ │ ├── opening_loc: (2,3)-(2,4) = "{"
│ │ └── closing_loc: (2,15)-(2,16) = "}"
│ ├── statements: