diff options
author | Jemma Issroff <jemmaissroff@gmail.com> | 2023-10-26 15:02:27 -0300 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-10-26 18:47:50 +0000 |
commit | 7e4ee92de225473d3ad3ac8d0a27bd02a2905738 (patch) | |
tree | 32dcd2d4305bcba802b82e319799339ef942a38b /test/prism/snapshots/whitequark/args_assocs_legacy.txt | |
parent | a082e560bb3b875dfcce5ff4743a04e76e008d46 (diff) |
[ruby/prism] Add KeywordSplat flag to ArgumentsNode
Method calls with keyword splat args compile differently than
without since they merge the keyword arg hash with the keyword splat
hash. We know this information at parse time, so can set a flag
which the compiler can use.
https://github.com/ruby/prism/commit/e5f8a9a3cd
Diffstat (limited to 'test/prism/snapshots/whitequark/args_assocs_legacy.txt')
-rw-r--r-- | test/prism/snapshots/whitequark/args_assocs_legacy.txt | 194 |
1 files changed, 100 insertions, 94 deletions
diff --git a/test/prism/snapshots/whitequark/args_assocs_legacy.txt b/test/prism/snapshots/whitequark/args_assocs_legacy.txt index efca0773c7..6730512872 100644 --- a/test/prism/snapshots/whitequark/args_assocs_legacy.txt +++ b/test/prism/snapshots/whitequark/args_assocs_legacy.txt @@ -10,20 +10,21 @@ │ ├── opening_loc: (1,3)-(1,4) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (1,4)-(1,13)) - │ │ └── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (1,4)-(1,13)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (1,4)-(1,13)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (1,4)-(1,8)) - │ │ │ ├── opening_loc: (1,4)-(1,5) = ":" - │ │ │ ├── value_loc: (1,5)-(1,8) = "foo" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "foo" - │ │ ├── value: - │ │ │ @ IntegerNode (location: (1,12)-(1,13)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (1,9)-(1,11) = "=>" + │ │ ├── arguments: (length: 1) + │ │ │ └── @ KeywordHashNode (location: (1,4)-(1,13)) + │ │ │ └── elements: (length: 1) + │ │ │ └── @ AssocNode (location: (1,4)-(1,13)) + │ │ │ ├── key: + │ │ │ │ @ SymbolNode (location: (1,4)-(1,8)) + │ │ │ │ ├── opening_loc: (1,4)-(1,5) = ":" + │ │ │ │ ├── value_loc: (1,5)-(1,8) = "foo" + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── unescaped: "foo" + │ │ │ ├── value: + │ │ │ │ @ IntegerNode (location: (1,12)-(1,13)) + │ │ │ │ └── flags: decimal + │ │ │ └── operator_loc: (1,9)-(1,11) = "=>" + │ │ └── flags: ∅ │ ├── closing_loc: (1,13)-(1,14) = ")" │ ├── block: ∅ │ ├── flags: ∅ @@ -35,20 +36,21 @@ │ ├── opening_loc: (3,3)-(3,4) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (3,4)-(3,13)) - │ │ └── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (3,4)-(3,13)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (3,4)-(3,13)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (3,4)-(3,8)) - │ │ │ ├── opening_loc: (3,4)-(3,5) = ":" - │ │ │ ├── value_loc: (3,5)-(3,8) = "foo" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "foo" - │ │ ├── value: - │ │ │ @ IntegerNode (location: (3,12)-(3,13)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (3,9)-(3,11) = "=>" + │ │ ├── arguments: (length: 1) + │ │ │ └── @ KeywordHashNode (location: (3,4)-(3,13)) + │ │ │ └── elements: (length: 1) + │ │ │ └── @ AssocNode (location: (3,4)-(3,13)) + │ │ │ ├── key: + │ │ │ │ @ SymbolNode (location: (3,4)-(3,8)) + │ │ │ │ ├── opening_loc: (3,4)-(3,5) = ":" + │ │ │ │ ├── value_loc: (3,5)-(3,8) = "foo" + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── unescaped: "foo" + │ │ │ ├── value: + │ │ │ │ @ IntegerNode (location: (3,12)-(3,13)) + │ │ │ │ └── flags: decimal + │ │ │ └── operator_loc: (3,9)-(3,11) = "=>" + │ │ └── flags: ∅ │ ├── closing_loc: (3,19)-(3,20) = ")" │ ├── block: │ │ @ BlockArgumentNode (location: (3,15)-(3,19)) @@ -74,30 +76,31 @@ │ ├── opening_loc: ∅ │ ├── arguments: │ │ @ ArgumentsNode (location: (5,9)-(5,21)) - │ │ └── arguments: (length: 2) - │ │ ├── @ CallNode (location: (5,9)-(5,12)) - │ │ │ ├── receiver: ∅ - │ │ │ ├── call_operator_loc: ∅ - │ │ │ ├── message_loc: (5,9)-(5,12) = "foo" - │ │ │ ├── opening_loc: ∅ - │ │ │ ├── arguments: ∅ - │ │ │ ├── closing_loc: ∅ - │ │ │ ├── block: ∅ - │ │ │ ├── flags: variable_call - │ │ │ └── name: :foo - │ │ └── @ KeywordHashNode (location: (5,14)-(5,21)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (5,14)-(5,21)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (5,14)-(5,16)) - │ │ │ ├── opening_loc: (5,14)-(5,15) = ":" - │ │ │ ├── value_loc: (5,15)-(5,16) = "a" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "a" - │ │ ├── value: - │ │ │ @ IntegerNode (location: (5,20)-(5,21)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (5,17)-(5,19) = "=>" + │ │ ├── arguments: (length: 2) + │ │ │ ├── @ CallNode (location: (5,9)-(5,12)) + │ │ │ │ ├── receiver: ∅ + │ │ │ │ ├── call_operator_loc: ∅ + │ │ │ │ ├── message_loc: (5,9)-(5,12) = "foo" + │ │ │ │ ├── opening_loc: ∅ + │ │ │ │ ├── arguments: ∅ + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ ├── block: ∅ + │ │ │ │ ├── flags: variable_call + │ │ │ │ └── name: :foo + │ │ │ └── @ KeywordHashNode (location: (5,14)-(5,21)) + │ │ │ └── elements: (length: 1) + │ │ │ └── @ AssocNode (location: (5,14)-(5,21)) + │ │ │ ├── key: + │ │ │ │ @ SymbolNode (location: (5,14)-(5,16)) + │ │ │ │ ├── opening_loc: (5,14)-(5,15) = ":" + │ │ │ │ ├── value_loc: (5,15)-(5,16) = "a" + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── unescaped: "a" + │ │ │ ├── value: + │ │ │ │ @ IntegerNode (location: (5,20)-(5,21)) + │ │ │ │ └── flags: decimal + │ │ │ └── operator_loc: (5,17)-(5,19) = "=>" + │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ │ ├── flags: ∅ @@ -110,20 +113,21 @@ │ ├── opening_loc: (7,4)-(7,5) = "[" │ ├── arguments: │ │ @ ArgumentsNode (location: (7,5)-(7,14)) - │ │ └── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (7,5)-(7,14)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (7,5)-(7,14)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (7,5)-(7,9)) - │ │ │ ├── opening_loc: (7,5)-(7,6) = ":" - │ │ │ ├── value_loc: (7,6)-(7,9) = "bar" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "bar" - │ │ ├── value: - │ │ │ @ IntegerNode (location: (7,13)-(7,14)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (7,10)-(7,12) = "=>" + │ │ ├── arguments: (length: 1) + │ │ │ └── @ KeywordHashNode (location: (7,5)-(7,14)) + │ │ │ └── elements: (length: 1) + │ │ │ └── @ AssocNode (location: (7,5)-(7,14)) + │ │ │ ├── key: + │ │ │ │ @ SymbolNode (location: (7,5)-(7,9)) + │ │ │ │ ├── opening_loc: (7,5)-(7,6) = ":" + │ │ │ │ ├── value_loc: (7,6)-(7,9) = "bar" + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── unescaped: "bar" + │ │ │ ├── value: + │ │ │ │ @ IntegerNode (location: (7,13)-(7,14)) + │ │ │ │ └── flags: decimal + │ │ │ └── operator_loc: (7,10)-(7,12) = "=>" + │ │ └── flags: ∅ │ ├── closing_loc: (7,14)-(7,15) = "]" │ ├── block: ∅ │ ├── flags: ∅ @@ -133,20 +137,21 @@ │ ├── lparen_loc: (9,5)-(9,6) = "(" │ ├── arguments: │ │ @ ArgumentsNode (location: (9,6)-(9,16)) - │ │ └── arguments: (length: 1) - │ │ └── @ KeywordHashNode (location: (9,6)-(9,16)) - │ │ └── elements: (length: 1) - │ │ └── @ AssocNode (location: (9,6)-(9,16)) - │ │ ├── key: - │ │ │ @ SymbolNode (location: (9,6)-(9,10)) - │ │ │ ├── opening_loc: (9,6)-(9,7) = ":" - │ │ │ ├── value_loc: (9,7)-(9,10) = "foo" - │ │ │ ├── closing_loc: ∅ - │ │ │ └── unescaped: "foo" - │ │ ├── value: - │ │ │ @ IntegerNode (location: (9,14)-(9,16)) - │ │ │ └── flags: decimal - │ │ └── operator_loc: (9,11)-(9,13) = "=>" + │ │ ├── arguments: (length: 1) + │ │ │ └── @ KeywordHashNode (location: (9,6)-(9,16)) + │ │ │ └── elements: (length: 1) + │ │ │ └── @ AssocNode (location: (9,6)-(9,16)) + │ │ │ ├── key: + │ │ │ │ @ SymbolNode (location: (9,6)-(9,10)) + │ │ │ │ ├── opening_loc: (9,6)-(9,7) = ":" + │ │ │ │ ├── value_loc: (9,7)-(9,10) = "foo" + │ │ │ │ ├── closing_loc: ∅ + │ │ │ │ └── unescaped: "foo" + │ │ │ ├── value: + │ │ │ │ @ IntegerNode (location: (9,14)-(9,16)) + │ │ │ │ └── flags: decimal + │ │ │ └── operator_loc: (9,11)-(9,13) = "=>" + │ │ └── flags: ∅ │ ├── rparen_loc: (9,16)-(9,17) = ")" │ └── block: ∅ └── @ YieldNode (location: (11,0)-(11,17)) @@ -154,18 +159,19 @@ ├── lparen_loc: (11,5)-(11,6) = "(" ├── arguments: │ @ ArgumentsNode (location: (11,6)-(11,16)) - │ └── arguments: (length: 1) - │ └── @ KeywordHashNode (location: (11,6)-(11,16)) - │ └── elements: (length: 1) - │ └── @ AssocNode (location: (11,6)-(11,16)) - │ ├── key: - │ │ @ SymbolNode (location: (11,6)-(11,10)) - │ │ ├── opening_loc: (11,6)-(11,7) = ":" - │ │ ├── value_loc: (11,7)-(11,10) = "foo" - │ │ ├── closing_loc: ∅ - │ │ └── unescaped: "foo" - │ ├── value: - │ │ @ IntegerNode (location: (11,14)-(11,16)) - │ │ └── flags: decimal - │ └── operator_loc: (11,11)-(11,13) = "=>" + │ ├── arguments: (length: 1) + │ │ └── @ KeywordHashNode (location: (11,6)-(11,16)) + │ │ └── elements: (length: 1) + │ │ └── @ AssocNode (location: (11,6)-(11,16)) + │ │ ├── key: + │ │ │ @ SymbolNode (location: (11,6)-(11,10)) + │ │ │ ├── opening_loc: (11,6)-(11,7) = ":" + │ │ │ ├── value_loc: (11,7)-(11,10) = "foo" + │ │ │ ├── closing_loc: ∅ + │ │ │ └── unescaped: "foo" + │ │ ├── value: + │ │ │ @ IntegerNode (location: (11,14)-(11,16)) + │ │ │ └── flags: decimal + │ │ └── operator_loc: (11,11)-(11,13) = "=>" + │ └── flags: ∅ └── rparen_loc: (11,16)-(11,17) = ")" |