diff options
author | TSUYUSATO Kitsune <make.just.on@gmail.com> | 2023-11-15 23:05:08 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-11-22 14:53:28 +0000 |
commit | 8794836bf256c4bad51111b085f9d07e463432a0 (patch) | |
tree | 04e05461f87cf359ac877f03d111a31b99e04601 /test/prism/snapshots | |
parent | 2aefbbaab9c9a86fb70f30bca86ed73411679d6d (diff) | |
download | ruby-8794836bf256c4bad51111b085f9d07e463432a0.tar.gz |
[ruby/prism] Fix associativity of binary range with begin-less range
Fix https://github.com/ruby/prism/pull/1828
https://github.com/ruby/prism/commit/22c0640e48
Diffstat (limited to 'test/prism/snapshots')
-rw-r--r-- | test/prism/snapshots/ranges.txt | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/test/prism/snapshots/ranges.txt b/test/prism/snapshots/ranges.txt index 3c7892f29b..f52f93633c 100644 --- a/test/prism/snapshots/ranges.txt +++ b/test/prism/snapshots/ranges.txt @@ -1,8 +1,8 @@ -@ ProgramNode (location: (1,0)-(17,5)) +@ ProgramNode (location: (1,0)-(19,8)) ├── locals: [] └── statements: - @ StatementsNode (location: (1,0)-(17,5)) - └── body: (length: 9) + @ StatementsNode (location: (1,0)-(19,8)) + └── body: (length: 10) ├── @ ParenthesesNode (location: (1,0)-(1,6)) │ ├── body: │ │ @ StatementsNode (location: (1,1)-(1,5)) @@ -146,16 +146,30 @@ │ │ │ └── flags: ∅ │ │ └── operator_loc: ∅ │ └── closing_loc: (15,13)-(15,14) = "}" - └── @ ParenthesesNode (location: (17,0)-(17,5)) - ├── body: - │ @ StatementsNode (location: (17,1)-(17,4)) - │ └── body: (length: 1) - │ └── @ RangeNode (location: (17,1)-(17,4)) - │ ├── left: - │ │ @ IntegerNode (location: (17,1)-(17,2)) - │ │ └── flags: decimal - │ ├── right: ∅ - │ ├── operator_loc: (17,2)-(17,4) = ".." - │ └── flags: ∅ - ├── opening_loc: (17,0)-(17,1) = "(" - └── closing_loc: (17,4)-(17,5) = ")" + ├── @ ParenthesesNode (location: (17,0)-(17,5)) + │ ├── body: + │ │ @ StatementsNode (location: (17,1)-(17,4)) + │ │ └── body: (length: 1) + │ │ └── @ RangeNode (location: (17,1)-(17,4)) + │ │ ├── left: + │ │ │ @ IntegerNode (location: (17,1)-(17,2)) + │ │ │ └── flags: decimal + │ │ ├── right: ∅ + │ │ ├── operator_loc: (17,2)-(17,4) = ".." + │ │ └── flags: ∅ + │ ├── opening_loc: (17,0)-(17,1) = "(" + │ └── closing_loc: (17,4)-(17,5) = ")" + └── @ RangeNode (location: (19,0)-(19,8)) + ├── left: + │ @ IntegerNode (location: (19,0)-(19,1)) + │ └── flags: decimal + ├── right: + │ @ RangeNode (location: (19,5)-(19,8)) + │ ├── left: ∅ + │ ├── right: + │ │ @ IntegerNode (location: (19,7)-(19,8)) + │ │ └── flags: decimal + │ ├── operator_loc: (19,5)-(19,7) = ".." + │ └── flags: ∅ + ├── operator_loc: (19,2)-(19,4) = ".." + └── flags: ∅ |