diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-10-16 15:47:02 -0400 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-10-17 00:42:31 +0000 |
commit | 9bd99cc171a8c226ea330f45a51fb3345813c6b4 (patch) | |
tree | 68668d0ae80b9e9d41ba27f7a5da5a7dfd9fc638 /test/prism/snapshots | |
parent | 448e8b5ebb1a6504351c2e30a7d945f10dbcdd78 (diff) | |
download | ruby-9bd99cc171a8c226ea330f45a51fb3345813c6b4.tar.gz |
[ruby/prism] Fix up super with a blockarg
https://github.com/ruby/prism/commit/0ea19ed823
Diffstat (limited to 'test/prism/snapshots')
-rw-r--r-- | test/prism/snapshots/super.txt | 102 |
1 files changed, 90 insertions, 12 deletions
diff --git a/test/prism/snapshots/super.txt b/test/prism/snapshots/super.txt index 24a7ae81a9..3ce771d349 100644 --- a/test/prism/snapshots/super.txt +++ b/test/prism/snapshots/super.txt @@ -1,8 +1,8 @@ -@ ProgramNode (location: (1,0)-(7,14)) +@ ProgramNode (location: (1,0)-(17,20)) ├── locals: [] └── statements: - @ StatementsNode (location: (1,0)-(7,14)) - └── body: (length: 4) + @ StatementsNode (location: (1,0)-(17,20)) + └── body: (length: 9) ├── @ ForwardingSuperNode (location: (1,0)-(1,5)) │ └── block: ∅ ├── @ SuperNode (location: (3,0)-(3,7)) @@ -21,17 +21,95 @@ │ │ └── flags: decimal │ ├── rparen_loc: (5,7)-(5,8) = ")" │ └── block: ∅ - └── @ SuperNode (location: (7,0)-(7,14)) - ├── keyword_loc: (7,0)-(7,5) = "super" - ├── lparen_loc: (7,5)-(7,6) = "(" + ├── @ SuperNode (location: (7,0)-(7,14)) + │ ├── keyword_loc: (7,0)-(7,5) = "super" + │ ├── lparen_loc: (7,5)-(7,6) = "(" + │ ├── arguments: + │ │ @ ArgumentsNode (location: (7,6)-(7,13)) + │ │ └── arguments: (length: 3) + │ │ ├── @ IntegerNode (location: (7,6)-(7,7)) + │ │ │ └── flags: decimal + │ │ ├── @ IntegerNode (location: (7,9)-(7,10)) + │ │ │ └── flags: decimal + │ │ └── @ IntegerNode (location: (7,12)-(7,13)) + │ │ └── flags: decimal + │ ├── rparen_loc: (7,13)-(7,14) = ")" + │ └── block: ∅ + ├── @ SuperNode (location: (9,0)-(9,11)) + │ ├── keyword_loc: (9,0)-(9,5) = "super" + │ ├── lparen_loc: ∅ + │ ├── arguments: ∅ + │ ├── rparen_loc: ∅ + │ └── block: + │ @ BlockArgumentNode (location: (9,6)-(9,11)) + │ ├── expression: + │ │ @ SymbolNode (location: (9,7)-(9,11)) + │ │ ├── opening_loc: (9,7)-(9,8) = ":" + │ │ ├── value_loc: (9,8)-(9,11) = "foo" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "foo" + │ └── operator_loc: (9,6)-(9,7) = "&" + ├── @ SuperNode (location: (11,0)-(11,11)) + │ ├── keyword_loc: (11,0)-(11,5) = "super" + │ ├── lparen_loc: (11,5)-(11,6) = "(" + │ ├── arguments: ∅ + │ ├── rparen_loc: (11,11)-(11,12) = ")" + │ └── block: + │ @ BlockArgumentNode (location: (11,6)-(11,11)) + │ ├── expression: + │ │ @ SymbolNode (location: (11,7)-(11,11)) + │ │ ├── opening_loc: (11,7)-(11,8) = ":" + │ │ ├── value_loc: (11,8)-(11,11) = "foo" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "foo" + │ └── operator_loc: (11,6)-(11,7) = "&" + ├── @ ForwardingSuperNode (location: (13,0)-(13,8)) + │ └── block: + │ @ BlockNode (location: (13,6)-(13,8)) + │ ├── locals: [] + │ ├── parameters: ∅ + │ ├── body: ∅ + │ ├── opening_loc: (13,6)-(13,7) = "{" + │ └── closing_loc: (13,7)-(13,8) = "}" + ├── @ SuperNode (location: (15,0)-(15,17)) + │ ├── keyword_loc: (15,0)-(15,5) = "super" + │ ├── lparen_loc: (15,5)-(15,6) = "(" + │ ├── arguments: + │ │ @ ArgumentsNode (location: (15,6)-(15,13)) + │ │ └── arguments: (length: 3) + │ │ ├── @ IntegerNode (location: (15,6)-(15,7)) + │ │ │ └── flags: decimal + │ │ ├── @ IntegerNode (location: (15,9)-(15,10)) + │ │ │ └── flags: decimal + │ │ └── @ IntegerNode (location: (15,12)-(15,13)) + │ │ └── flags: decimal + │ ├── rparen_loc: (15,13)-(15,14) = ")" + │ └── block: + │ @ BlockNode (location: (15,15)-(15,17)) + │ ├── locals: [] + │ ├── parameters: ∅ + │ ├── body: ∅ + │ ├── opening_loc: (15,15)-(15,16) = "{" + │ └── closing_loc: (15,16)-(15,17) = "}" + └── @ SuperNode (location: (17,0)-(17,20)) + ├── keyword_loc: (17,0)-(17,5) = "super" + ├── lparen_loc: (17,5)-(17,6) = "(" ├── arguments: - │ @ ArgumentsNode (location: (7,6)-(7,13)) + │ @ ArgumentsNode (location: (17,6)-(17,13)) │ └── arguments: (length: 3) - │ ├── @ IntegerNode (location: (7,6)-(7,7)) + │ ├── @ IntegerNode (location: (17,6)-(17,7)) │ │ └── flags: decimal - │ ├── @ IntegerNode (location: (7,9)-(7,10)) + │ ├── @ IntegerNode (location: (17,9)-(17,10)) │ │ └── flags: decimal - │ └── @ IntegerNode (location: (7,12)-(7,13)) + │ └── @ IntegerNode (location: (17,12)-(17,13)) │ └── flags: decimal - ├── rparen_loc: (7,13)-(7,14) = ")" - └── block: ∅ + ├── rparen_loc: (17,20)-(17,21) = ")" + └── block: + @ BlockArgumentNode (location: (17,15)-(17,20)) + ├── expression: + │ @ SymbolNode (location: (17,16)-(17,20)) + │ ├── opening_loc: (17,16)-(17,17) = ":" + │ ├── value_loc: (17,17)-(17,20) = "foo" + │ ├── closing_loc: ∅ + │ └── unescaped: "foo" + └── operator_loc: (17,15)-(17,16) = "&" |