From 174aa53656b689277ab01bebd5d293dc0532f958 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Wed, 13 Sep 2023 21:06:13 -0400 Subject: [ruby/yarp] Handle concat character literal and string https://github.com/ruby/yarp/commit/fb141b8d07 --- test/yarp/snapshots/strings.txt | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'test/yarp/snapshots') diff --git a/test/yarp/snapshots/strings.txt b/test/yarp/snapshots/strings.txt index f59168e485..e562de1f2c 100644 --- a/test/yarp/snapshots/strings.txt +++ b/test/yarp/snapshots/strings.txt @@ -1,8 +1,8 @@ -@ ProgramNode (location: (0...498)) +@ ProgramNode (location: (0...506)) ├── locals: [] └── statements: - @ StatementsNode (location: (0...498)) - └── body: (length: 47) + @ StatementsNode (location: (0...506)) + └── body: (length: 48) ├── @ StringNode (location: (0...6)) │ ├── opening_loc: (0...2) = "%%" │ ├── content_loc: (2...5) = "abc" @@ -424,8 +424,21 @@ │ ├── content_loc: (488...489) = "a" │ ├── closing_loc: ∅ │ └── unescaped: "a" - └── @ StringNode (location: (491...498)) - ├── opening_loc: (491...494) = "%Q{" - ├── content_loc: (494...497) = "abc" - ├── closing_loc: (497...498) = "}" + ├── @ StringConcatNode (location: (491...497)) + │ ├── left: + │ │ @ StringNode (location: (491...493)) + │ │ ├── opening_loc: (491...492) = "?" + │ │ ├── content_loc: (492...493) = "a" + │ │ ├── closing_loc: ∅ + │ │ └── unescaped: "a" + │ └── right: + │ @ StringNode (location: (494...497)) + │ ├── opening_loc: (494...495) = "\"" + │ ├── content_loc: (495...496) = "a" + │ ├── closing_loc: (496...497) = "\"" + │ └── unescaped: "a" + └── @ StringNode (location: (499...506)) + ├── opening_loc: (499...502) = "%Q{" + ├── content_loc: (502...505) = "abc" + ├── closing_loc: (505...506) = "}" └── unescaped: "abc" -- cgit v1.2.3