From 90838a949053d7f240ddab2067b1dde8cca2ae7b Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Tue, 12 Sep 2023 20:48:28 -0400 Subject: [ruby/yarp] Fix associativity for a couple of operators https://github.com/ruby/yarp/commit/820774976d --- test/yarp/snapshots/arithmetic.txt | 100 ++++++++++++++++++++++++++++--------- 1 file changed, 77 insertions(+), 23 deletions(-) (limited to 'test/yarp/snapshots') diff --git a/test/yarp/snapshots/arithmetic.txt b/test/yarp/snapshots/arithmetic.txt index 3a305e4bc3..7138973041 100644 --- a/test/yarp/snapshots/arithmetic.txt +++ b/test/yarp/snapshots/arithmetic.txt @@ -1,8 +1,8 @@ -@ ProgramNode (location: (0...39)) +@ ProgramNode (location: (0...58)) ├── locals: [] └── statements: - @ StatementsNode (location: (0...39)) - └── body: (length: 4) + @ StatementsNode (location: (0...58)) + └── body: (length: 5) ├── @ CallNode (location: (0...8)) │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ @@ -119,35 +119,89 @@ │ ├── block: ∅ │ ├── flags: ∅ │ └── name: "**" - └── @ CallNode (location: (31...39)) - ├── receiver: ∅ + ├── @ CallNode (location: (31...39)) + │ ├── receiver: ∅ + │ ├── call_operator_loc: ∅ + │ ├── message_loc: (31...34) = "foo" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (35...39)) + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (35...39)) + │ │ ├── receiver: + │ │ │ @ CallNode (location: (36...39)) + │ │ │ ├── receiver: ∅ + │ │ │ ├── call_operator_loc: ∅ + │ │ │ ├── message_loc: (36...39) = "bar" + │ │ │ ├── opening_loc: ∅ + │ │ │ ├── arguments: ∅ + │ │ │ ├── closing_loc: ∅ + │ │ │ ├── block: ∅ + │ │ │ ├── flags: variable_call + │ │ │ └── name: "bar" + │ │ ├── call_operator_loc: ∅ + │ │ ├── message_loc: (35...36) = "~" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ ├── block: ∅ + │ │ ├── flags: ∅ + │ │ └── name: "~" + │ ├── closing_loc: ∅ + │ ├── block: ∅ + │ ├── flags: ∅ + │ └── name: "foo" + └── @ CallNode (location: (41...58)) + ├── receiver: + │ @ CallNode (location: (41...51)) + │ ├── receiver: + │ │ @ CallNode (location: (41...44)) + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── message_loc: (41...44) = "foo" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ ├── block: ∅ + │ │ ├── flags: variable_call + │ │ └── name: "foo" + │ ├── call_operator_loc: ∅ + │ ├── message_loc: (45...47) = "<<" + │ ├── opening_loc: ∅ + │ ├── arguments: + │ │ @ ArgumentsNode (location: (48...51)) + │ │ └── arguments: (length: 1) + │ │ └── @ CallNode (location: (48...51)) + │ │ ├── receiver: ∅ + │ │ ├── call_operator_loc: ∅ + │ │ ├── message_loc: (48...51) = "bar" + │ │ ├── opening_loc: ∅ + │ │ ├── arguments: ∅ + │ │ ├── closing_loc: ∅ + │ │ ├── block: ∅ + │ │ ├── flags: variable_call + │ │ └── name: "bar" + │ ├── closing_loc: ∅ + │ ├── block: ∅ + │ ├── flags: ∅ + │ └── name: "<<" ├── call_operator_loc: ∅ - ├── message_loc: (31...34) = "foo" + ├── message_loc: (52...54) = "<<" ├── opening_loc: ∅ ├── arguments: - │ @ ArgumentsNode (location: (35...39)) + │ @ ArgumentsNode (location: (55...58)) │ └── arguments: (length: 1) - │ └── @ CallNode (location: (35...39)) - │ ├── receiver: - │ │ @ CallNode (location: (36...39)) - │ │ ├── receiver: ∅ - │ │ ├── call_operator_loc: ∅ - │ │ ├── message_loc: (36...39) = "bar" - │ │ ├── opening_loc: ∅ - │ │ ├── arguments: ∅ - │ │ ├── closing_loc: ∅ - │ │ ├── block: ∅ - │ │ ├── flags: variable_call - │ │ └── name: "bar" + │ └── @ CallNode (location: (55...58)) + │ ├── receiver: ∅ │ ├── call_operator_loc: ∅ - │ ├── message_loc: (35...36) = "~" + │ ├── message_loc: (55...58) = "baz" │ ├── opening_loc: ∅ │ ├── arguments: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ - │ ├── flags: ∅ - │ └── name: "~" + │ ├── flags: variable_call + │ └── name: "baz" ├── closing_loc: ∅ ├── block: ∅ ├── flags: ∅ - └── name: "foo" + └── name: "<<" -- cgit v1.2.3