diff options
author | Kevin Newton <kddnewton@gmail.com> | 2023-10-24 12:42:16 -0400 |
---|---|---|
committer | Kevin Newton <kddnewton@gmail.com> | 2023-10-26 15:19:52 -0400 |
commit | 21dc64534b841ed905e7ea0806e125de13e2f250 (patch) | |
tree | 7e17aa90a7d2c818d5c3963c85894fa845b1e7e8 | |
parent | d1bb858d476446ab82e6caa29c061a0da734c8eb (diff) | |
download | ruby-21dc64534b841ed905e7ea0806e125de13e2f250.tar.gz |
[ruby/prism] Regenerate snapshots
https://github.com/ruby/prism/commit/160df9a687
103 files changed, 746 insertions, 714 deletions
diff --git a/lib/prism/prism.gemspec b/lib/prism/prism.gemspec index 63c6702561..faabc22de9 100644 --- a/lib/prism/prism.gemspec +++ b/lib/prism/prism.gemspec @@ -47,6 +47,7 @@ Gem::Specification.new do |spec| "include/prism/node.h", "include/prism/pack.h", "include/prism/parser.h", + "include/prism/prettyprint.h", "include/prism/regexp.h", "include/prism/util/pm_buffer.h", "include/prism/util/pm_char.h", diff --git a/prism/prism.c b/prism/prism.c index 34f3cc50c5..7513f2cb8e 100644 --- a/prism/prism.c +++ b/prism/prism.c @@ -81,14 +81,12 @@ debug_contexts(pm_parser_t *parser) { } PRISM_ATTRIBUTE_UNUSED static void -debug_node(const char *message, pm_parser_t *parser, pm_node_t *node) { - pm_buffer_t buffer; - if (!pm_buffer_init(&buffer)) return; - - pm_prettyprint(parser, node, &buffer); +debug_node(const pm_parser_t *parser, const pm_node_t *node) { + pm_buffer_t output_buffer = { 0 }; + pm_prettyprint(&output_buffer, parser, node); - fprintf(stderr, "%s\n%.*s\n", message, (int) buffer.length, buffer.value); - pm_buffer_free(&buffer); + fprintf(stderr, "%.*s", (int) output_buffer.length, output_buffer.value); + pm_buffer_free(&output_buffer); } PRISM_ATTRIBUTE_UNUSED static void diff --git a/prism/templates/src/prettyprint.c.erb b/prism/templates/src/prettyprint.c.erb index 43d7c57190..ecd2c227df 100644 --- a/prism/templates/src/prettyprint.c.erb +++ b/prism/templates/src/prettyprint.c.erb @@ -1,10 +1,4 @@ -#include "prism/defines.h" - -#include <stdio.h> - -#include "prism/ast.h" -#include "prism/parser.h" -#include "prism/util/pm_buffer.h" +#include "prism/prettyprint.h" static void prettyprint_source(pm_buffer_t *output_buffer, const uint8_t *source, size_t length) { @@ -55,7 +49,7 @@ prettyprint_constant(pm_buffer_t *output_buffer, const pm_parser_t *parser, cons } static void -prettyprint_node(pm_buffer_t *output_buffer, pm_parser_t *parser, const pm_node_t *node, pm_buffer_t *prefix_buffer) { +prettyprint_node(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_node_t *node, pm_buffer_t *prefix_buffer) { switch (PM_NODE_TYPE(node)) { case PM_SCOPE_NODE: // We do not need to print a ScopeNode as it's not part of the AST. @@ -185,7 +179,7 @@ prettyprint_node(pm_buffer_t *output_buffer, pm_parser_t *parser, const pm_node_ // Pretty-prints the AST represented by the given node to the given buffer. PRISM_EXPORTED_FUNCTION void -pm_prettyprint(pm_buffer_t *output_buffer, pm_parser_t *parser, const pm_node_t *node) { +pm_prettyprint(pm_buffer_t *output_buffer, const pm_parser_t *parser, const pm_node_t *node) { pm_buffer_t prefix_buffer = { 0 }; prettyprint_node(output_buffer, parser, node, &prefix_buffer); pm_buffer_free(&prefix_buffer); diff --git a/test/prism/comments_test.rb b/test/prism/comments_test.rb index 0748beb391..dc43fb6a36 100644 --- a/test/prism/comments_test.rb +++ b/test/prism/comments_test.rb @@ -6,9 +6,18 @@ module Prism class CommentsTest < TestCase def test_comment_inline source = "# comment" - - assert_comment source, :inline, [0, 9, 1, 1, 0, 9] assert_equal [0], Debug.newlines(source) + + assert_comment( + source, + :inline, + start_offset: 0, + end_offset: 9, + start_line: 1, + end_line: 1, + start_column: 0, + end_column: 9 + ) end def test_comment_inline_def @@ -18,7 +27,16 @@ module Prism end RUBY - assert_comment source, :inline, [10, 21, 2, 2, 2, 13] + assert_comment( + source, + :inline, + start_offset: 10, + end_offset: 21, + start_line: 2, + end_line: 2, + start_column: 2, + end_column: 13 + ) end def test_comment___END__ @@ -27,13 +45,31 @@ module Prism comment RUBY - assert_comment source, :__END__, [0, 16, 1, 2, 0, 0] + assert_comment( + source, + :__END__, + start_offset: 0, + end_offset: 16, + start_line: 1, + end_line: 3, + start_column: 0, + end_column: 0 + ) end def test_comment___END__crlf source = "__END__\r\ncomment\r\n" - assert_comment source, :__END__, [0, 18, 1, 2, 0, 0] + assert_comment( + source, + :__END__, + start_offset: 0, + end_offset: 18, + start_line: 1, + end_line: 3, + start_column: 0, + end_column: 0 + ) end def test_comment_embedded_document @@ -43,7 +79,16 @@ module Prism =end RUBY - assert_comment source, :embdoc, [0, 20, 1, 3, 0, 0] + assert_comment( + source, + :embdoc, + start_offset: 0, + end_offset: 20, + start_line: 1, + end_line: 4, + start_column: 0, + end_column: 0 + ) end def test_comment_embedded_document_with_content_on_same_line @@ -52,7 +97,16 @@ module Prism =end RUBY - assert_comment source, :embdoc, [0, 24, 1, 2, 0, 0] + assert_comment( + source, + :embdoc, + start_offset: 0, + end_offset: 24, + start_line: 1, + end_line: 3, + start_column: 0, + end_column: 0 + ) end def test_attaching_comments @@ -81,33 +135,18 @@ module Prism private - def assert_comment(source, type, locations) - start_offset, end_offset, start_line, end_line, start_column, end_column = locations - expected = { - start_offset: start_offset, - end_offset: end_offset, - start_line: start_line, - end_line: end_line, - start_column: start_column, - end_column: end_column - } - + def assert_comment(source, type, start_offset:, end_offset:, start_line:, end_line:, start_column:, end_column:) result = Prism.parse(source) assert result.errors.empty?, result.errors.map(&:message).join("\n") assert_equal type, result.comments.first.type - first_comment_location = result.comments.first.location - - actual = { - start_offset: first_comment_location.start_offset, - end_offset: first_comment_location.end_offset, - start_line: first_comment_location.start_line, - end_line: first_comment_location.end_line, - start_column: first_comment_location.start_column, - end_column: first_comment_location.end_column - } - - assert_equal expected, actual + location = result.comments.first.location + assert_equal start_offset, location.start_offset, -> { "Expected start_offset to be #{start_offset}" } + assert_equal end_offset, location.end_offset, -> { "Expected end_offset to be #{end_offset}" } + assert_equal start_line, location.start_line, -> { "Expected start_line to be #{start_line}" } + assert_equal end_line, location.end_line, -> { "Expected end_line to be #{end_line}" } + assert_equal start_column, location.start_column, -> { "Expected start_column to be #{start_column}" } + assert_equal end_column, location.end_column, -> { "Expected end_column to be #{end_column}" } end end end diff --git a/test/prism/snapshots/blocks.txt b/test/prism/snapshots/blocks.txt index 7b3164c3f1..91a0735960 100644 --- a/test/prism/snapshots/blocks.txt +++ b/test/prism/snapshots/blocks.txt @@ -743,7 +743,7 @@ │ │ │ ├── optionals: (length: 0) │ │ │ ├── rest: │ │ │ │ @ RestParameterNode (location: (54,11)-(54,12)) - │ │ │ │ ├── name: nil + │ │ │ │ ├── name: ∅ │ │ │ │ ├── name_loc: ∅ │ │ │ │ └── operator_loc: (54,11)-(54,12) = "," │ │ │ ├── posts: (length: 0) diff --git a/test/prism/snapshots/dash_heredocs.txt b/test/prism/snapshots/dash_heredocs.txt index 6a0fe432fb..4c76b61d5c 100644 --- a/test/prism/snapshots/dash_heredocs.txt +++ b/test/prism/snapshots/dash_heredocs.txt @@ -6,16 +6,16 @@ ├── @ StringNode (location: (1,0)-(1,6)) │ ├── flags: ∅ │ ├── opening_loc: (1,0)-(1,6) = "<<-EOF" - │ ├── content_loc: (2,0)-(2,0) = " a\n" - │ ├── closing_loc: (3,0)-(3,0) = "EOF\n" + │ ├── content_loc: (2,0)-(3,0) = " a\n" + │ ├── closing_loc: (3,0)-(4,0) = "EOF\n" │ └── unescaped: " a\n" ├── @ CallNode (location: (5,0)-(5,20)) │ ├── receiver: │ │ @ StringNode (location: (5,0)-(5,8)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (5,0)-(5,8) = "<<-FIRST" - │ │ ├── content_loc: (6,0)-(6,0) = " a\n" - │ │ ├── closing_loc: (7,0)-(7,0) = "FIRST\n" + │ │ ├── content_loc: (6,0)-(7,0) = " a\n" + │ │ ├── closing_loc: (7,0)-(8,0) = "FIRST\n" │ │ └── unescaped: " a\n" │ ├── call_operator_loc: ∅ │ ├── message_loc: (5,9)-(5,10) = "+" @@ -26,8 +26,8 @@ │ │ │ └── @ StringNode (location: (5,11)-(5,20)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (5,11)-(5,20) = "<<-SECOND" - │ │ │ ├── content_loc: (8,0)-(8,0) = " b\n" - │ │ │ ├── closing_loc: (9,0)-(9,0) = "SECOND\n" + │ │ │ ├── content_loc: (8,0)-(9,0) = " b\n" + │ │ │ ├── closing_loc: (9,0)-(10,0) = "SECOND\n" │ │ │ └── unescaped: " b\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ @@ -37,10 +37,10 @@ ├── @ InterpolatedXStringNode (location: (11,0)-(11,8)) │ ├── opening_loc: (11,0)-(11,8) = "<<-`EOF`" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (12,0)-(12,0)) + │ │ ├── @ StringNode (location: (12,0)-(13,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (12,0)-(12,0) = " a\n" + │ │ │ ├── content_loc: (12,0)-(13,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: " a\n" │ │ ├── @ EmbeddedStatementsNode (location: (13,0)-(13,4)) @@ -59,32 +59,32 @@ │ │ │ │ ├── flags: variable_call │ │ │ │ └── name: :b │ │ │ └── closing_loc: (13,3)-(13,4) = "}" - │ │ └── @ StringNode (location: (13,4)-(13,0)) + │ │ └── @ StringNode (location: (13,4)-(14,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (13,4)-(13,0) = "\n" + │ │ ├── content_loc: (13,4)-(14,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ └── closing_loc: (14,0)-(14,0) = "EOF\n" + │ └── closing_loc: (14,0)-(15,0) = "EOF\n" ├── @ StringNode (location: (16,0)-(16,6)) │ ├── flags: ∅ │ ├── opening_loc: (16,0)-(16,6) = "<<-EOF" - │ ├── content_loc: (17,0)-(17,0) = " a\n" - │ ├── closing_loc: (18,0)-(18,0) = "EOF\n" + │ ├── content_loc: (17,0)-(18,0) = " a\n" + │ ├── closing_loc: (18,0)-(19,0) = "EOF\n" │ └── unescaped: " a\n" ├── @ StringNode (location: (20,0)-(20,6)) │ ├── flags: ∅ │ ├── opening_loc: (20,0)-(20,6) = "<<-EOF" - │ ├── content_loc: (21,0)-(22,0) = " a\n b\n" - │ ├── closing_loc: (23,0)-(23,0) = " EOF\n" + │ ├── content_loc: (21,0)-(23,0) = " a\n b\n" + │ ├── closing_loc: (23,0)-(24,0) = " EOF\n" │ └── unescaped: " a\n b\n" ├── @ InterpolatedStringNode (location: (25,0)-(25,8)) │ ├── opening_loc: (25,0)-(25,8) = "<<-\"EOF\"" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (26,0)-(26,0)) + │ │ ├── @ StringNode (location: (26,0)-(27,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (26,0)-(26,0) = " a\n" + │ │ │ ├── content_loc: (26,0)-(27,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: " a\n" │ │ ├── @ EmbeddedStatementsNode (location: (27,0)-(27,4)) @@ -103,20 +103,20 @@ │ │ │ │ ├── flags: variable_call │ │ │ │ └── name: :b │ │ │ └── closing_loc: (27,3)-(27,4) = "}" - │ │ └── @ StringNode (location: (27,4)-(27,0)) + │ │ └── @ StringNode (location: (27,4)-(28,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (27,4)-(27,0) = "\n" + │ │ ├── content_loc: (27,4)-(28,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ └── closing_loc: (28,0)-(28,0) = "EOF\n" + │ └── closing_loc: (28,0)-(29,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (30,0)-(30,6)) │ ├── opening_loc: (30,0)-(30,6) = "<<-EOF" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (31,0)-(31,0)) + │ │ ├── @ StringNode (location: (31,0)-(32,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (31,0)-(31,0) = " a\n" + │ │ │ ├── content_loc: (31,0)-(32,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: " a\n" │ │ ├── @ EmbeddedStatementsNode (location: (32,0)-(32,4)) @@ -135,13 +135,13 @@ │ │ │ │ ├── flags: variable_call │ │ │ │ └── name: :b │ │ │ └── closing_loc: (32,3)-(32,4) = "}" - │ │ └── @ StringNode (location: (32,4)-(32,0)) + │ │ └── @ StringNode (location: (32,4)-(33,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (32,4)-(32,0) = "\n" + │ │ ├── content_loc: (32,4)-(33,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ └── closing_loc: (33,0)-(33,0) = "EOF\n" + │ └── closing_loc: (33,0)-(34,0) = "EOF\n" ├── @ StringNode (location: (35,0)-(35,6)) │ ├── flags: ∅ │ ├── opening_loc: (35,0)-(35,2) = "%#" @@ -151,28 +151,28 @@ ├── @ StringNode (location: (37,0)-(37,6)) │ ├── flags: ∅ │ ├── opening_loc: (37,0)-(37,6) = "<<-EOF" - │ ├── content_loc: (38,0)-(39,0) = " a\n b\n" - │ ├── closing_loc: (40,0)-(40,0) = "EOF\n" + │ ├── content_loc: (38,0)-(40,0) = " a\n b\n" + │ ├── closing_loc: (40,0)-(41,0) = "EOF\n" │ └── unescaped: " a\n b\n" ├── @ StringNode (location: (42,0)-(42,5)) │ ├── flags: ∅ │ ├── opening_loc: (42,0)-(42,5) = "<<-''" - │ ├── content_loc: (43,0)-(42,0) = "" - │ ├── closing_loc: (43,0)-(43,0) = "\n" + │ ├── content_loc: (43,0)-(43,0) = "" + │ ├── closing_loc: (43,0)-(44,0) = "\n" │ └── unescaped: "" ├── @ StringNode (location: (45,0)-(45,8)) │ ├── flags: ∅ │ ├── opening_loc: (45,0)-(45,8) = "<<-'EOF'" - │ ├── content_loc: (46,0)-(46,0) = " a \#{1}\n" - │ ├── closing_loc: (47,0)-(47,0) = "EOF\n" + │ ├── content_loc: (46,0)-(47,0) = " a \#{1}\n" + │ ├── closing_loc: (47,0)-(48,0) = "EOF\n" │ └── unescaped: " a \#{1}\n" ├── @ CallNode (location: (49,0)-(49,11)) │ ├── receiver: │ │ @ StringNode (location: (49,0)-(49,4)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (49,0)-(49,4) = "<<-A" - │ │ ├── content_loc: (50,0)-(50,0) = " a\n" - │ │ ├── closing_loc: (51,0)-(51,0) = "A\n" + │ │ ├── content_loc: (50,0)-(51,0) = " a\n" + │ │ ├── closing_loc: (51,0)-(52,0) = "A\n" │ │ └── unescaped: " a\n" │ ├── call_operator_loc: ∅ │ ├── message_loc: (49,5)-(49,6) = "+" @@ -197,13 +197,13 @@ │ │ │ │ │ │ └── @ IntegerNode (location: (53,4)-(53,5)) │ │ │ │ │ │ └── flags: decimal │ │ │ │ │ └── closing_loc: (54,2)-(54,3) = "}" - │ │ │ │ └── @ StringNode (location: (54,3)-(54,0)) + │ │ │ │ └── @ StringNode (location: (54,3)-(55,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (54,3)-(54,0) = "\n" + │ │ │ │ ├── content_loc: (54,3)-(55,0) = "\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "\n" - │ │ │ └── closing_loc: (55,0)-(55,0) = "B\n" + │ │ │ └── closing_loc: (55,0)-(56,0) = "B\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -214,8 +214,8 @@ │ @ StringNode (location: (57,0)-(57,4)) │ ├── flags: ∅ │ ├── opening_loc: (57,0)-(57,4) = "<<-A" - │ ├── content_loc: (58,0)-(58,0) = " a\n" - │ ├── closing_loc: (59,0)-(59,0) = "A\n" + │ ├── content_loc: (58,0)-(59,0) = " a\n" + │ ├── closing_loc: (59,0)-(60,0) = "A\n" │ └── unescaped: " a\n" ├── call_operator_loc: ∅ ├── message_loc: (57,5)-(57,6) = "+" @@ -240,13 +240,13 @@ │ │ │ │ │ └── @ IntegerNode (location: (62,2)-(62,3)) │ │ │ │ │ └── flags: decimal │ │ │ │ └── closing_loc: (62,3)-(62,4) = "}" - │ │ │ └── @ StringNode (location: (62,4)-(62,0)) + │ │ │ └── @ StringNode (location: (62,4)-(63,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (62,4)-(62,0) = "\n" + │ │ │ ├── content_loc: (62,4)-(63,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── closing_loc: (63,0)-(63,0) = "B\n" + │ │ └── closing_loc: (63,0)-(64,0) = "B\n" │ └── flags: ∅ ├── closing_loc: ∅ ├── block: ∅ diff --git a/test/prism/snapshots/dos_endings.txt b/test/prism/snapshots/dos_endings.txt index da4c8b5ebe..758334138c 100644 --- a/test/prism/snapshots/dos_endings.txt +++ b/test/prism/snapshots/dos_endings.txt @@ -43,19 +43,19 @@ ├── @ StringNode (location: (7,0)-(7,4)) │ ├── flags: ∅ │ ├── opening_loc: (7,0)-(7,4) = "<<-E" - │ ├── content_loc: (8,0)-(10,0) = " 1 \\\r\n 2\r\n 3\r\n" - │ ├── closing_loc: (11,0)-(11,0) = "E\r\n" + │ ├── content_loc: (8,0)-(11,0) = " 1 \\\r\n 2\r\n 3\r\n" + │ ├── closing_loc: (11,0)-(12,0) = "E\r\n" │ └── unescaped: " 1 2\r\n 3\r\n" - ├── @ LocalVariableWriteNode (location: (13,0)-(14,0)) + ├── @ LocalVariableWriteNode (location: (13,0)-(15,0)) │ ├── name: :x │ ├── depth: 0 │ ├── name_loc: (13,0)-(13,1) = "x" │ ├── value: - │ │ @ StringNode (location: (13,4)-(14,0)) + │ │ @ StringNode (location: (13,4)-(15,0)) │ │ ├── flags: ∅ - │ │ ├── opening_loc: (13,4)-(13,0) = "%\r\n" - │ │ ├── content_loc: (14,0)-(13,0) = "" - │ │ ├── closing_loc: (14,0)-(14,0) = "\r\n" + │ │ ├── opening_loc: (13,4)-(14,0) = "%\r\n" + │ │ ├── content_loc: (14,0)-(14,0) = "" + │ │ ├── closing_loc: (14,0)-(15,0) = "\r\n" │ │ └── unescaped: "" │ └── operator_loc: (13,2)-(13,3) = "=" └── @ LocalVariableWriteNode (location: (17,0)-(17,20)) @@ -76,19 +76,19 @@ │ │ │ │ @ InterpolatedStringNode (location: (17,8)-(17,14)) │ │ │ │ ├── opening_loc: (17,8)-(17,14) = "<<~EOF" │ │ │ │ ├── parts: (length: 2) - │ │ │ │ │ ├── @ StringNode (location: (18,0)-(18,0)) + │ │ │ │ │ ├── @ StringNode (location: (18,0)-(19,0)) │ │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ ├── content_loc: (18,0)-(18,0) = "\r\n" + │ │ │ │ │ │ ├── content_loc: (18,0)-(19,0) = "\r\n" │ │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ │ └── unescaped: "\n" - │ │ │ │ │ └── @ StringNode (location: (19,0)-(19,0)) + │ │ │ │ │ └── @ StringNode (location: (19,0)-(20,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (19,0)-(19,0) = " baz\r\n" + │ │ │ │ │ ├── content_loc: (19,0)-(20,0) = " baz\r\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "baz\r\n" - │ │ │ │ └── closing_loc: (20,0)-(20,0) = " EOF\r\n" + │ │ │ │ └── closing_loc: (20,0)-(21,0) = " EOF\r\n" │ │ │ ├── call_operator_loc: (17,14)-(17,15) = "." │ │ │ ├── message_loc: (17,15)-(17,19) = "chop" │ │ │ ├── opening_loc: ∅ diff --git a/test/prism/snapshots/embdoc_no_newline_at_end.txt b/test/prism/snapshots/embdoc_no_newline_at_end.txt index 870bdb6ad5..3a21ce5559 100644 --- a/test/prism/snapshots/embdoc_no_newline_at_end.txt +++ b/test/prism/snapshots/embdoc_no_newline_at_end.txt @@ -1,5 +1,5 @@ -@ ProgramNode (location: (1,0)-(0,0)) +@ ProgramNode (location: (1,0)-(1,0)) ├── locals: [] └── statements: - @ StatementsNode (location: (1,0)-(0,0)) + @ StatementsNode (location: (1,0)-(1,0)) └── body: (length: 0) diff --git a/test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt b/test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt index e7b45833cf..b403d618fc 100644 --- a/test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt +++ b/test/prism/snapshots/heredoc_with_escaped_newline_at_start.txt @@ -8,8 +8,8 @@ │ │ @ StringNode (location: (1,0)-(1,9)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (1,0)-(1,9) = "<<-TARGET" - │ │ ├── content_loc: (2,0)-(1,0) = "" - │ │ ├── closing_loc: (2,0)-(2,0) = "TARGET\n" + │ │ ├── content_loc: (2,0)-(2,0) = "" + │ │ ├── closing_loc: (2,0)-(3,0) = "TARGET\n" │ │ └── unescaped: "" │ ├── call_operator_loc: (1,9)-(1,10) = "." │ ├── message_loc: (1,10)-(1,14) = "gsub" @@ -39,8 +39,8 @@ │ @ StringNode (location: (5,0)-(5,9)) │ ├── flags: ∅ │ ├── opening_loc: (5,0)-(5,9) = "<<-TARGET" - │ ├── content_loc: (6,0)-(5,0) = "" - │ ├── closing_loc: (6,0)-(6,0) = "TARGET\r\n" + │ ├── content_loc: (6,0)-(6,0) = "" + │ ├── closing_loc: (6,0)-(7,0) = "TARGET\r\n" │ └── unescaped: "" ├── call_operator_loc: (5,9)-(5,10) = "." ├── message_loc: (5,10)-(5,14) = "gsub" diff --git a/test/prism/snapshots/heredoc_with_trailing_newline.txt b/test/prism/snapshots/heredoc_with_trailing_newline.txt index 01178042d6..b064931aa8 100644 --- a/test/prism/snapshots/heredoc_with_trailing_newline.txt +++ b/test/prism/snapshots/heredoc_with_trailing_newline.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,6)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,6) = "<<-END" - ├── content_loc: (2,0)-(1,0) = "" + ├── content_loc: (2,0)-(2,0) = "" ├── closing_loc: (2,0)-(2,3) = "END" └── unescaped: "" diff --git a/test/prism/snapshots/heredocs_nested.txt b/test/prism/snapshots/heredocs_nested.txt index 0e76652072..f03aabc63a 100644 --- a/test/prism/snapshots/heredocs_nested.txt +++ b/test/prism/snapshots/heredocs_nested.txt @@ -6,10 +6,10 @@ └── @ InterpolatedStringNode (location: (1,0)-(1,7)) ├── opening_loc: (1,0)-(1,7) = "<<~RUBY" ├── parts: (length: 4) - │ ├── @ StringNode (location: (2,0)-(2,0)) + │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (2,0)-(2,0) = "pre\n" + │ │ ├── content_loc: (2,0)-(3,0) = "pre\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "pre\n" │ ├── @ EmbeddedStatementsNode (location: (3,0)-(7,1)) @@ -20,20 +20,20 @@ │ │ │ └── @ StringNode (location: (4,0)-(4,6)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (4,0)-(4,6) = "<<RUBY" - │ │ │ ├── content_loc: (5,0)-(5,0) = " hello\n" - │ │ │ ├── closing_loc: (6,0)-(6,0) = "RUBY\n" + │ │ │ ├── content_loc: (5,0)-(6,0) = " hello\n" + │ │ │ ├── closing_loc: (6,0)-(7,0) = "RUBY\n" │ │ │ └── unescaped: " hello\n" │ │ └── closing_loc: (7,0)-(7,1) = "}" - │ ├── @ StringNode (location: (7,1)-(7,0)) + │ ├── @ StringNode (location: (7,1)-(8,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (7,1)-(7,0) = "\n" + │ │ ├── content_loc: (7,1)-(8,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ └── @ StringNode (location: (8,0)-(8,0)) + │ └── @ StringNode (location: (8,0)-(9,0)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (8,0)-(8,0) = "post\n" + │ ├── content_loc: (8,0)-(9,0) = "post\n" │ ├── closing_loc: ∅ │ └── unescaped: "post\n" - └── closing_loc: (9,0)-(9,0) = "RUBY\n" + └── closing_loc: (9,0)-(10,0) = "RUBY\n" diff --git a/test/prism/snapshots/heredocs_with_ignored_newlines.txt b/test/prism/snapshots/heredocs_with_ignored_newlines.txt index 361c8687aa..00111b1ca5 100644 --- a/test/prism/snapshots/heredocs_with_ignored_newlines.txt +++ b/test/prism/snapshots/heredocs_with_ignored_newlines.txt @@ -6,58 +6,58 @@ ├── @ StringNode (location: (1,0)-(1,7)) │ ├── flags: ∅ │ ├── opening_loc: (1,0)-(1,7) = "<<-HERE" - │ ├── content_loc: (2,0)-(1,0) = "" - │ ├── closing_loc: (2,0)-(2,0) = "HERE\n" + │ ├── content_loc: (2,0)-(2,0) = "" + │ ├── closing_loc: (2,0)-(3,0) = "HERE\n" │ └── unescaped: "" └── @ InterpolatedStringNode (location: (4,0)-(4,8)) ├── opening_loc: (4,0)-(4,8) = "<<~THERE" ├── parts: (length: 8) - │ ├── @ StringNode (location: (5,0)-(5,0)) + │ ├── @ StringNode (location: (5,0)-(6,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (5,0)-(5,0) = " way over\n" + │ │ ├── content_loc: (5,0)-(6,0) = " way over\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "way over\n" - │ ├── @ StringNode (location: (6,0)-(6,0)) + │ ├── @ StringNode (location: (6,0)-(7,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (6,0)-(6,0) = " <<HERE\n" + │ │ ├── content_loc: (6,0)-(7,0) = " <<HERE\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "<<HERE\n" - │ ├── @ StringNode (location: (7,0)-(7,0)) + │ ├── @ StringNode (location: (7,0)-(8,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (7,0)-(7,0) = " not here\n" + │ │ ├── content_loc: (7,0)-(8,0) = " not here\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: " not here\n" - │ ├── @ StringNode (location: (8,0)-(8,0)) + │ ├── @ StringNode (location: (8,0)-(9,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (8,0)-(8,0) = " HERE\n" + │ │ ├── content_loc: (8,0)-(9,0) = " HERE\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "HERE\n" - │ ├── @ StringNode (location: (9,0)-(9,0)) + │ ├── @ StringNode (location: (9,0)-(10,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (9,0)-(9,0) = "\n" + │ │ ├── content_loc: (9,0)-(10,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ ├── @ StringNode (location: (10,0)-(11,0)) + │ ├── @ StringNode (location: (10,0)-(12,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (10,0)-(11,0) = " <<~BUT\\\n but\n" + │ │ ├── content_loc: (10,0)-(12,0) = " <<~BUT\\\n but\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "<<~BUT but\n" - │ ├── @ StringNode (location: (12,0)-(12,0)) + │ ├── @ StringNode (location: (12,0)-(13,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (12,0)-(12,0) = " BUT\n" + │ │ ├── content_loc: (12,0)-(13,0) = " BUT\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "BUT\n" - │ └── @ StringNode (location: (13,0)-(13,0)) + │ └── @ StringNode (location: (13,0)-(14,0)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (13,0)-(13,0) = " there\n" + │ ├── content_loc: (13,0)-(14,0) = " there\n" │ ├── closing_loc: ∅ │ └── unescaped: " there\n" - └── closing_loc: (14,0)-(14,0) = "THERE\n" + └── closing_loc: (14,0)-(15,0) = "THERE\n" diff --git a/test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt b/test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt index f4b4ec2044..df422f0c1c 100644 --- a/test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt +++ b/test/prism/snapshots/heredocs_with_ignored_newlines_and_non_empty.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,6)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,6) = "<<-EOE" - ├── content_loc: (2,0)-(3,0) = " some\n heredocs\n" + ├── content_loc: (2,0)-(4,0) = " some\n heredocs\n" ├── closing_loc: (4,0)-(4,3) = "EOE" └── unescaped: " some\n heredocs\n" diff --git a/test/prism/snapshots/methods.txt b/test/prism/snapshots/methods.txt index abe050cd8c..c4f2a0853c 100644 --- a/test/prism/snapshots/methods.txt +++ b/test/prism/snapshots/methods.txt @@ -343,7 +343,7 @@ │ │ ├── keywords: (length: 0) │ │ ├── keyword_rest: │ │ │ @ KeywordRestParameterNode (location: (41,6)-(41,8)) - │ │ │ ├── name: nil + │ │ │ ├── name: ∅ │ │ │ ├── name_loc: ∅ │ │ │ └── operator_loc: (41,6)-(41,8) = "**" │ │ └── block: ∅ @@ -687,7 +687,7 @@ │ │ ├── optionals: (length: 0) │ │ ├── rest: │ │ │ @ RestParameterNode (location: (82,6)-(82,7)) - │ │ │ ├── name: nil + │ │ │ ├── name: ∅ │ │ │ ├── name_loc: ∅ │ │ │ └── operator_loc: (82,6)-(82,7) = "*" │ │ ├── posts: (length: 0) @@ -894,7 +894,7 @@ │ │ ├── optionals: (length: 0) │ │ ├── rest: │ │ │ @ RestParameterNode (location: (110,6)-(110,7)) - │ │ │ ├── name: nil + │ │ │ ├── name: ∅ │ │ │ ├── name_loc: ∅ │ │ │ └── operator_loc: (110,6)-(110,7) = "*" │ │ ├── posts: (length: 0) @@ -1079,7 +1079,7 @@ │ │ ├── keyword_rest: ∅ │ │ └── block: │ │ @ BlockParameterNode (location: (122,6)-(122,7)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (122,6)-(122,7) = "&" │ ├── body: ∅ diff --git a/test/prism/snapshots/newline_terminated.txt b/test/prism/snapshots/newline_terminated.txt index bf75257104..f112593d61 100644 --- a/test/prism/snapshots/newline_terminated.txt +++ b/test/prism/snapshots/newline_terminated.txt @@ -1,7 +1,7 @@ -@ ProgramNode (location: (3,0)-(40,0)) +@ ProgramNode (location: (3,0)-(41,0)) ├── locals: [] └── statements: - @ StatementsNode (location: (3,0)-(40,0)) + @ StatementsNode (location: (3,0)-(41,0)) └── body: (length: 17) ├── @ StringNode (location: (3,0)-(3,6)) │ ├── flags: ∅ @@ -27,11 +27,11 @@ │ ├── content_loc: (6,2)-(6,5) = "abc" │ ├── closing_loc: (6,5)-(6,6) = "\r" │ └── unescaped: "abc" - ├── @ StringNode (location: (7,0)-(8,0)) + ├── @ StringNode (location: (7,0)-(9,0)) │ ├── flags: ∅ - │ ├── opening_loc: (7,0)-(7,0) = "%\n" + │ ├── opening_loc: (7,0)-(8,0) = "%\n" │ ├── content_loc: (8,0)-(8,3) = "abc" - │ ├── closing_loc: (8,3)-(8,0) = "\n" + │ ├── closing_loc: (8,3)-(9,0) = "\n" │ └── unescaped: "abc" ├── @ StringNode (location: (10,0)-(10,6)) │ ├── flags: ∅ @@ -39,29 +39,29 @@ │ ├── content_loc: (10,2)-(10,5) = "abc" │ ├── closing_loc: (10,5)-(10,6) = "\u0000" │ └── unescaped: "abc" - ├── @ StringNode (location: (11,0)-(12,0)) + ├── @ StringNode (location: (11,0)-(13,0)) │ ├── flags: ∅ - │ ├── opening_loc: (11,0)-(11,0) = "%\n" + │ ├── opening_loc: (11,0)-(12,0) = "%\n" │ ├── content_loc: (12,0)-(12,3) = "abc" - │ ├── closing_loc: (12,3)-(12,0) = "\n" + │ ├── closing_loc: (12,3)-(13,0) = "\n" │ └── unescaped: "abc" - ├── @ StringNode (location: (14,0)-(15,0)) + ├── @ StringNode (location: (14,0)-(16,0)) │ ├── flags: ∅ - │ ├── opening_loc: (14,0)-(14,0) = "%\n" + │ ├── opening_loc: (14,0)-(15,0) = "%\n" │ ├── content_loc: (15,0)-(15,4) = "\rabc" - │ ├── closing_loc: (15,4)-(15,0) = "\n" + │ ├── closing_loc: (15,4)-(16,0) = "\n" │ └── unescaped: "\rabc" - ├── @ StringNode (location: (17,0)-(18,0)) + ├── @ StringNode (location: (17,0)-(19,0)) │ ├── flags: ∅ - │ ├── opening_loc: (17,0)-(17,0) = "%\n" + │ ├── opening_loc: (17,0)-(18,0) = "%\n" │ ├── content_loc: (18,0)-(18,4) = "\rabc" - │ ├── closing_loc: (18,4)-(18,0) = "\n" + │ ├── closing_loc: (18,4)-(19,0) = "\n" │ └── unescaped: "\rabc" - ├── @ StringNode (location: (20,0)-(21,0)) + ├── @ StringNode (location: (20,0)-(22,0)) │ ├── flags: ∅ - │ ├── opening_loc: (20,0)-(20,0) = "%\n" + │ ├── opening_loc: (20,0)-(21,0) = "%\n" │ ├── content_loc: (21,0)-(21,3) = "abc" - │ ├── closing_loc: (21,3)-(21,0) = "\n" + │ ├── closing_loc: (21,3)-(22,0) = "\n" │ └── unescaped: "abc" ├── @ StringNode (location: (23,0)-(23,6)) │ ├── flags: ∅ @@ -69,39 +69,39 @@ │ ├── content_loc: (23,2)-(23,5) = "abc" │ ├── closing_loc: (23,5)-(23,6) = "\r" │ └── unescaped: "abc" - ├── @ StringNode (location: (24,0)-(25,0)) + ├── @ StringNode (location: (24,0)-(26,0)) │ ├── flags: ∅ - │ ├── opening_loc: (24,0)-(24,0) = "%\n" + │ ├── opening_loc: (24,0)-(25,0) = "%\n" │ ├── content_loc: (25,0)-(25,3) = "abc" - │ ├── closing_loc: (25,3)-(25,0) = "\n" + │ ├── closing_loc: (25,3)-(26,0) = "\n" │ └── unescaped: "abc" - ├── @ StringNode (location: (27,0)-(28,0)) + ├── @ StringNode (location: (27,0)-(29,0)) │ ├── flags: ∅ - │ ├── opening_loc: (27,0)-(27,0) = "%\n" + │ ├── opening_loc: (27,0)-(28,0) = "%\n" │ ├── content_loc: (28,0)-(28,3) = "abc" - │ ├── closing_loc: (28,3)-(28,0) = "\n" + │ ├── closing_loc: (28,3)-(29,0) = "\n" │ └── unescaped: "abc" - ├── @ StringNode (location: (30,0)-(31,0)) + ├── @ StringNode (location: (30,0)-(32,0)) │ ├── flags: ∅ - │ ├── opening_loc: (30,0)-(30,0) = "%\n" + │ ├── opening_loc: (30,0)-(31,0) = "%\n" │ ├── content_loc: (31,0)-(31,3) = "foo" - │ ├── closing_loc: (31,3)-(31,0) = "\n" + │ ├── closing_loc: (31,3)-(32,0) = "\n" │ └── unescaped: "foo" - ├── @ StringNode (location: (33,0)-(34,0)) + ├── @ StringNode (location: (33,0)-(35,0)) │ ├── flags: ∅ - │ ├── opening_loc: (33,0)-(33,0) = "%q\n" + │ ├── opening_loc: (33,0)-(34,0) = "%q\n" │ ├── content_loc: (34,0)-(34,3) = "foo" - │ ├── closing_loc: (34,3)-(34,0) = "\n" + │ ├── closing_loc: (34,3)-(35,0) = "\n" │ └── unescaped: "foo" - ├── @ StringNode (location: (36,0)-(37,0)) + ├── @ StringNode (location: (36,0)-(38,0)) │ ├── flags: ∅ - │ ├── opening_loc: (36,0)-(36,0) = "%Q\n" + │ ├── opening_loc: (36,0)-(37,0) = "%Q\n" │ ├── content_loc: (37,0)-(37,3) = "foo" - │ ├── closing_loc: (37,3)-(37,0) = "\n" + │ ├── closing_loc: (37,3)-(38,0) = "\n" │ └── unescaped: "foo" - └── @ RegularExpressionNode (location: (39,0)-(40,0)) - ├── opening_loc: (39,0)-(39,0) = "%r\n" + └── @ RegularExpressionNode (location: (39,0)-(41,0)) + ├── opening_loc: (39,0)-(40,0) = "%r\n" ├── content_loc: (40,0)-(40,3) = "foo" - ├── closing_loc: (40,3)-(40,0) = "\n" + ├── closing_loc: (40,3)-(41,0) = "\n" ├── unescaped: "foo" └── flags: ∅ diff --git a/test/prism/snapshots/regex.txt b/test/prism/snapshots/regex.txt index 80aabe534d..d1d913c88c 100644 --- a/test/prism/snapshots/regex.txt +++ b/test/prism/snapshots/regex.txt @@ -148,7 +148,7 @@ │ └── flags: ignore_case ├── @ RegularExpressionNode (location: (21,0)-(24,1)) │ ├── opening_loc: (21,0)-(21,3) = "%r(" - │ ├── content_loc: (21,3)-(23,0) = "\n(?:[\\w\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\\w\#$%_']+)\n" + │ ├── content_loc: (21,3)-(24,0) = "\n(?:[\\w\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\\w\#$%_']+)\n" │ ├── closing_loc: (24,0)-(24,1) = ")" │ ├── unescaped: "\n(?:[\\w\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\\w\#$%_']+)\n" │ └── flags: ∅ diff --git a/test/prism/snapshots/seattlerb/TestRubyParserShared.txt b/test/prism/snapshots/seattlerb/TestRubyParserShared.txt index e9e4ae028a..0b48a86b5c 100644 --- a/test/prism/snapshots/seattlerb/TestRubyParserShared.txt +++ b/test/prism/snapshots/seattlerb/TestRubyParserShared.txt @@ -61,7 +61,7 @@ │ └── closing_loc: (29,0)-(29,1) = "]" ├── @ RegularExpressionNode (location: (31,0)-(34,1)) │ ├── opening_loc: (31,0)-(31,3) = "%r[" - │ ├── content_loc: (31,3)-(33,0) = "\n\n\n" + │ ├── content_loc: (31,3)-(34,0) = "\n\n\n" │ ├── closing_loc: (34,0)-(34,1) = "]" │ ├── unescaped: "\n\n\n" │ └── flags: ∅ diff --git a/test/prism/snapshots/seattlerb/block_arg__bare.txt b/test/prism/snapshots/seattlerb/block_arg__bare.txt index fb9b0bdd0d..ae83960e6a 100644 --- a/test/prism/snapshots/seattlerb/block_arg__bare.txt +++ b/test/prism/snapshots/seattlerb/block_arg__bare.txt @@ -17,7 +17,7 @@ │ ├── keyword_rest: ∅ │ └── block: │ @ BlockParameterNode (location: (1,6)-(1,7)) - │ ├── name: nil + │ ├── name: ∅ │ ├── name_loc: ∅ │ └── operator_loc: (1,6)-(1,7) = "&" ├── body: ∅ diff --git a/test/prism/snapshots/seattlerb/bug236.txt b/test/prism/snapshots/seattlerb/bug236.txt index c9389d4561..f87c869c4b 100644 --- a/test/prism/snapshots/seattlerb/bug236.txt +++ b/test/prism/snapshots/seattlerb/bug236.txt @@ -23,7 +23,7 @@ │ │ │ │ ├── optionals: (length: 0) │ │ │ │ ├── rest: │ │ │ │ │ @ RestParameterNode (location: (1,4)-(1,5)) - │ │ │ │ │ ├── name: nil + │ │ │ │ │ ├── name: ∅ │ │ │ │ │ ├── name_loc: ∅ │ │ │ │ │ └── operator_loc: (1,4)-(1,5) = "," │ │ │ │ ├── posts: (length: 0) diff --git a/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt b/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt index c5c169fc0e..0edbf87616 100644 --- a/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt +++ b/test/prism/snapshots/seattlerb/defn_arg_asplat_arg.txt @@ -15,7 +15,7 @@ │ ├── optionals: (length: 0) │ ├── rest: │ │ @ RestParameterNode (location: (1,17)-(1,18)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (1,17)-(1,18) = "*" │ ├── posts: (length: 1) diff --git a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt index 60c8e7bcb8..daa6c6bb06 100644 --- a/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt +++ b/test/prism/snapshots/seattlerb/defn_kwarg_kwsplat_anon.txt @@ -22,7 +22,7 @@ │ │ └── flags: decimal │ ├── keyword_rest: │ │ @ KeywordRestParameterNode (location: (1,12)-(1,14)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (1,12)-(1,14) = "**" │ └── block: ∅ diff --git a/test/prism/snapshots/seattlerb/defn_splat_arg.txt b/test/prism/snapshots/seattlerb/defn_splat_arg.txt index 69b1c0749a..40b79287d0 100644 --- a/test/prism/snapshots/seattlerb/defn_splat_arg.txt +++ b/test/prism/snapshots/seattlerb/defn_splat_arg.txt @@ -13,7 +13,7 @@ │ ├── optionals: (length: 0) │ ├── rest: │ │ @ RestParameterNode (location: (1,6)-(1,7)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (1,6)-(1,7) = "*" │ ├── posts: (length: 1) diff --git a/test/prism/snapshots/seattlerb/difficult0_.txt b/test/prism/snapshots/seattlerb/difficult0_.txt index 1ebb76c054..4d7ab2ba44 100644 --- a/test/prism/snapshots/seattlerb/difficult0_.txt +++ b/test/prism/snapshots/seattlerb/difficult0_.txt @@ -18,8 +18,8 @@ │ │ │ │ @ StringNode (location: (1,2)-(1,8)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (1,2)-(1,8) = "<<-END" - │ │ │ │ ├── content_loc: (2,0)-(2,0) = " a\n" - │ │ │ │ ├── closing_loc: (3,0)-(3,0) = " END\n" + │ │ │ │ ├── content_loc: (2,0)-(3,0) = " a\n" + │ │ │ │ ├── closing_loc: (3,0)-(4,0) = " END\n" │ │ │ │ └── unescaped: " a\n" │ │ │ ├── call_operator_loc: ∅ │ │ │ ├── message_loc: (1,8)-(1,9) = "+" @@ -30,10 +30,10 @@ │ │ │ │ │ └── @ InterpolatedStringNode (location: (1,9)-(4,4)) │ │ │ │ │ ├── opening_loc: (1,9)-(1,10) = "'" │ │ │ │ │ ├── parts: (length: 2) - │ │ │ │ │ │ ├── @ StringNode (location: (1,10)-(1,0)) + │ │ │ │ │ │ ├── @ StringNode (location: (1,10)-(2,0)) │ │ │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ │ ├── content_loc: (1,10)-(1,0) = "b\n" + │ │ │ │ │ │ │ ├── content_loc: (1,10)-(2,0) = "b\n" │ │ │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ │ │ └── unescaped: "b\n" │ │ │ │ │ │ └── @ StringNode (location: (4,0)-(4,3)) diff --git a/test/prism/snapshots/seattlerb/heredoc__backslash_dos_format.txt b/test/prism/snapshots/seattlerb/heredoc__backslash_dos_format.txt index 1d8b569dfe..6ba437e36a 100644 --- a/test/prism/snapshots/seattlerb/heredoc__backslash_dos_format.txt +++ b/test/prism/snapshots/seattlerb/heredoc__backslash_dos_format.txt @@ -11,7 +11,7 @@ │ @ StringNode (location: (1,6)-(1,12)) │ ├── flags: ∅ │ ├── opening_loc: (1,6)-(1,12) = "<<-XXX" - │ ├── content_loc: (2,0)-(3,0) = "before\\\r\nafter\r\n" - │ ├── closing_loc: (4,0)-(4,0) = "XXX\r\n" + │ ├── content_loc: (2,0)-(4,0) = "before\\\r\nafter\r\n" + │ ├── closing_loc: (4,0)-(5,0) = "XXX\r\n" │ └── unescaped: "beforeafter\r\n" └── operator_loc: (1,4)-(1,5) = "=" diff --git a/test/prism/snapshots/seattlerb/heredoc_backslash_nl.txt b/test/prism/snapshots/seattlerb/heredoc_backslash_nl.txt index 3f98b7cd43..fc4c1784fe 100644 --- a/test/prism/snapshots/seattlerb/heredoc_backslash_nl.txt +++ b/test/prism/snapshots/seattlerb/heredoc_backslash_nl.txt @@ -6,12 +6,12 @@ ├── @ StringNode (location: (1,0)-(3,1)) │ ├── flags: ∅ │ ├── opening_loc: (1,0)-(1,1) = "\"" - │ ├── content_loc: (1,1)-(2,0) = " why would someone do this? \\\n blah\n" + │ ├── content_loc: (1,1)-(3,0) = " why would someone do this? \\\n blah\n" │ ├── closing_loc: (3,0)-(3,1) = "\"" │ └── unescaped: " why would someone do this? blah\n" └── @ StringNode (location: (5,0)-(5,7)) ├── flags: ∅ ├── opening_loc: (5,0)-(5,7) = "<<-DESC" - ├── content_loc: (6,0)-(7,0) = " why would someone do this? \\\n blah\n" - ├── closing_loc: (8,0)-(8,0) = "DESC\n" + ├── content_loc: (6,0)-(8,0) = " why would someone do this? \\\n blah\n" + ├── closing_loc: (8,0)-(9,0) = "DESC\n" └── unescaped: " why would someone do this? blah\n" diff --git a/test/prism/snapshots/seattlerb/heredoc_bad_hex_escape.txt b/test/prism/snapshots/seattlerb/heredoc_bad_hex_escape.txt index 29770b2ba3..e97c1fd7f4 100644 --- a/test/prism/snapshots/seattlerb/heredoc_bad_hex_escape.txt +++ b/test/prism/snapshots/seattlerb/heredoc_bad_hex_escape.txt @@ -11,7 +11,7 @@ │ @ StringNode (location: (1,4)-(1,9)) │ ├── flags: ∅ │ ├── opening_loc: (1,4)-(1,9) = "<<eos" - │ ├── content_loc: (2,0)-(2,0) = "a\\xE9b\n" - │ ├── closing_loc: (3,0)-(3,0) = "eos\n" + │ ├── content_loc: (2,0)-(3,0) = "a\\xE9b\n" + │ ├── closing_loc: (3,0)-(4,0) = "eos\n" │ └── unescaped: "a\xE9b\n" └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/heredoc_bad_oct_escape.txt b/test/prism/snapshots/seattlerb/heredoc_bad_oct_escape.txt index e51b83d922..223a32e298 100644 --- a/test/prism/snapshots/seattlerb/heredoc_bad_oct_escape.txt +++ b/test/prism/snapshots/seattlerb/heredoc_bad_oct_escape.txt @@ -11,7 +11,7 @@ │ @ StringNode (location: (1,4)-(1,10)) │ ├── flags: ∅ │ ├── opening_loc: (1,4)-(1,10) = "<<-EOS" - │ ├── content_loc: (2,0)-(3,0) = "a\\247b\ncöd\n" - │ ├── closing_loc: (4,0)-(4,0) = "EOS\n" + │ ├── content_loc: (2,0)-(4,0) = "a\\247b\ncöd\n" + │ ├── closing_loc: (4,0)-(5,0) = "EOS\n" │ └── unescaped: "a\xA7b\ncöd\n" └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt b/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt index 007c4308fe..4922448b06 100644 --- a/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt +++ b/test/prism/snapshots/seattlerb/heredoc_comma_arg.txt @@ -8,7 +8,7 @@ │ │ └── @ StringNode (location: (1,1)-(2,1)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (1,1)-(1,2) = "\"" - │ │ ├── content_loc: (1,2)-(1,0) = " some text\n" + │ │ ├── content_loc: (1,2)-(2,0) = " some text\n" │ │ ├── closing_loc: (2,0)-(2,1) = "\"" │ │ └── unescaped: " some text\n" │ ├── opening_loc: (1,0)-(1,1) = "[" @@ -18,8 +18,8 @@ │ └── @ StringNode (location: (4,1)-(4,8)) │ ├── flags: ∅ │ ├── opening_loc: (4,1)-(4,8) = "<<-FILE" - │ ├── content_loc: (5,0)-(5,0) = " some text\n" - │ ├── closing_loc: (6,0)-(6,0) = "FILE\n" + │ ├── content_loc: (5,0)-(6,0) = " some text\n" + │ ├── closing_loc: (6,0)-(7,0) = "FILE\n" │ └── unescaped: " some text\n" ├── opening_loc: (4,0)-(4,1) = "[" └── closing_loc: (7,0)-(7,1) = "]" diff --git a/test/prism/snapshots/seattlerb/heredoc_lineno.txt b/test/prism/snapshots/seattlerb/heredoc_lineno.txt index 138a6af030..eb632218a4 100644 --- a/test/prism/snapshots/seattlerb/heredoc_lineno.txt +++ b/test/prism/snapshots/seattlerb/heredoc_lineno.txt @@ -11,8 +11,8 @@ │ │ @ StringNode (location: (1,4)-(1,11)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (1,4)-(1,11) = "<<'CCC'" - │ │ ├── content_loc: (2,0)-(4,0) = "line2\nline3\nline4\n" - │ │ ├── closing_loc: (5,0)-(5,0) = "CCC\n" + │ │ ├── content_loc: (2,0)-(5,0) = "line2\nline3\nline4\n" + │ │ ├── closing_loc: (5,0)-(6,0) = "CCC\n" │ │ └── unescaped: "line2\nline3\nline4\n" │ └── operator_loc: (1,2)-(1,3) = "=" └── @ LocalVariableWriteNode (location: (7,0)-(7,6)) diff --git a/test/prism/snapshots/seattlerb/heredoc_nested.txt b/test/prism/snapshots/seattlerb/heredoc_nested.txt index d46f7253a5..d0b61a9495 100644 --- a/test/prism/snapshots/seattlerb/heredoc_nested.txt +++ b/test/prism/snapshots/seattlerb/heredoc_nested.txt @@ -16,23 +16,23 @@ │ │ │ │ │ └── @ StringNode (location: (2,2)-(2,5)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: (2,2)-(2,5) = "<<B" - │ │ │ │ │ ├── content_loc: (3,0)-(3,0) = "b\n" - │ │ │ │ │ ├── closing_loc: (4,0)-(4,0) = "B\n" + │ │ │ │ │ ├── content_loc: (3,0)-(4,0) = "b\n" + │ │ │ │ │ ├── closing_loc: (4,0)-(5,0) = "B\n" │ │ │ │ │ └── unescaped: "b\n" │ │ │ │ └── closing_loc: (2,5)-(2,6) = "}" - │ │ │ ├── @ StringNode (location: (2,6)-(2,0)) + │ │ │ ├── @ StringNode (location: (2,6)-(3,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (2,6)-(2,0) = "\n" + │ │ │ │ ├── content_loc: (2,6)-(3,0) = "\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "\n" - │ │ │ └── @ StringNode (location: (5,0)-(5,0)) + │ │ │ └── @ StringNode (location: (5,0)-(6,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (5,0)-(5,0) = "a\n" + │ │ │ ├── content_loc: (5,0)-(6,0) = "a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" - │ │ └── closing_loc: (6,0)-(6,0) = "A\n" + │ │ └── closing_loc: (6,0)-(7,0) = "A\n" │ └── @ IntegerNode (location: (7,0)-(7,1)) │ └── flags: decimal ├── opening_loc: (1,0)-(1,1) = "[" diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly.txt index 207da6b038..48f830befa 100644 --- a/test/prism/snapshots/seattlerb/heredoc_squiggly.txt +++ b/test/prism/snapshots/seattlerb/heredoc_squiggly.txt @@ -11,23 +11,23 @@ │ @ InterpolatedStringNode (location: (1,4)-(1,12)) │ ├── opening_loc: (1,4)-(1,12) = "<<~\"EOF\"" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (2,0)-(2,0)) + │ │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (2,0)-(2,0) = " x\n" + │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "x\n" - │ │ ├── @ StringNode (location: (3,0)-(3,0)) + │ │ ├── @ StringNode (location: (3,0)-(4,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (3,0)-(3,0) = " y\n" + │ │ │ ├── content_loc: (3,0)-(4,0) = " y\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "y\n" - │ │ └── @ StringNode (location: (4,0)-(4,0)) + │ │ └── @ StringNode (location: (4,0)-(5,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (4,0)-(4,0) = " z\n" + │ │ ├── content_loc: (4,0)-(5,0) = " z\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "z\n" - │ └── closing_loc: (5,0)-(5,0) = " EOF\n" + │ └── closing_loc: (5,0)-(6,0) = " EOF\n" └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt index 81289d6ba9..237f7483ec 100644 --- a/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt +++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_line_plus_interpolation.txt @@ -21,10 +21,10 @@ │ │ │ │ @ InterpolatedStringNode (location: (1,8)-(1,14)) │ │ │ │ ├── opening_loc: (1,8)-(1,14) = "<<~EOF" │ │ │ │ ├── parts: (length: 3) - │ │ │ │ │ ├── @ StringNode (location: (2,0)-(2,0)) + │ │ │ │ │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ │ ├── content_loc: (2,0)-(2,0) = "\n" + │ │ │ │ │ │ ├── content_loc: (2,0)-(3,0) = "\n" │ │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ │ └── unescaped: "\n" │ │ │ │ │ ├── @ EmbeddedStatementsNode (location: (3,4)-(3,10)) @@ -43,13 +43,13 @@ │ │ │ │ │ │ │ ├── flags: variable_call │ │ │ │ │ │ │ └── name: :bar │ │ │ │ │ │ └── closing_loc: (3,9)-(3,10) = "}" - │ │ │ │ │ └── @ StringNode (location: (3,10)-(3,0)) + │ │ │ │ │ └── @ StringNode (location: (3,10)-(4,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (3,10)-(3,0) = "baz\n" + │ │ │ │ │ ├── content_loc: (3,10)-(4,0) = "baz\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "baz\n" - │ │ │ │ └── closing_loc: (4,0)-(4,0) = " EOF\n" + │ │ │ │ └── closing_loc: (4,0)-(5,0) = " EOF\n" │ │ │ ├── call_operator_loc: (1,14)-(1,15) = "." │ │ │ ├── message_loc: (1,15)-(1,19) = "chop" │ │ │ ├── opening_loc: ∅ diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt index a9abc3f40a..533f8ac460 100644 --- a/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt +++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_blank_lines.txt @@ -11,23 +11,23 @@ │ @ InterpolatedStringNode (location: (1,4)-(1,10)) │ ├── opening_loc: (1,4)-(1,10) = "<<~EOF" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (2,0)-(2,0)) + │ │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (2,0)-(2,0) = " x\n" + │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "x\n" - │ │ ├── @ StringNode (location: (3,0)-(3,0)) + │ │ ├── @ StringNode (location: (3,0)-(4,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (3,0)-(3,0) = "\n" + │ │ │ ├── content_loc: (3,0)-(4,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── @ StringNode (location: (4,0)-(4,0)) + │ │ └── @ StringNode (location: (4,0)-(5,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (4,0)-(4,0) = " z\n" + │ │ ├── content_loc: (4,0)-(5,0) = " z\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "z\n" - │ └── closing_loc: (5,0)-(5,0) = "EOF\n" + │ └── closing_loc: (5,0)-(6,0) = "EOF\n" └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt index 88049241d3..c998f19984 100644 --- a/test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt +++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_empty.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,4)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,4) = "<<~A" - ├── content_loc: (2,0)-(1,0) = "" - ├── closing_loc: (2,0)-(2,0) = "A\n" + ├── content_loc: (2,0)-(2,0) = "" + ├── closing_loc: (2,0)-(3,0) = "A\n" └── unescaped: "" diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt index 122a6ad05f..8602ed3731 100644 --- a/test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt +++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_interp.txt @@ -11,10 +11,10 @@ │ @ InterpolatedStringNode (location: (1,4)-(1,10)) │ ├── opening_loc: (1,4)-(1,10) = "<<~EOF" │ ├── parts: (length: 5) - │ │ ├── @ StringNode (location: (2,0)-(2,0)) + │ │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (2,0)-(2,0) = " w\n" + │ │ │ ├── content_loc: (2,0)-(3,0) = " w\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: " w\n" │ │ ├── @ StringNode (location: (3,0)-(3,3)) @@ -31,17 +31,17 @@ │ │ │ │ └── @ IntegerNode (location: (3,5)-(3,7)) │ │ │ │ └── flags: decimal │ │ │ └── closing_loc: (3,7)-(3,8) = "}" - │ │ ├── @ StringNode (location: (3,8)-(3,0)) + │ │ ├── @ StringNode (location: (3,8)-(4,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (3,8)-(3,0) = " y\n" + │ │ │ ├── content_loc: (3,8)-(4,0) = " y\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: " y\n" - │ │ └── @ StringNode (location: (4,0)-(4,0)) + │ │ └── @ StringNode (location: (4,0)-(5,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (4,0)-(4,0) = " z\n" + │ │ ├── content_loc: (4,0)-(5,0) = " z\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: " z\n" - │ └── closing_loc: (5,0)-(5,0) = " EOF\n" + │ └── closing_loc: (5,0)-(6,0) = " EOF\n" └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt index b7f67aca7f..7c17bc4820 100644 --- a/test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt +++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_no_indent.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,4)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,4) = "<<~A" - ├── content_loc: (2,0)-(2,0) = "a\n" - ├── closing_loc: (3,0)-(3,0) = "A\n" + ├── content_loc: (2,0)-(3,0) = "a\n" + ├── closing_loc: (3,0)-(4,0) = "A\n" └── unescaped: "a\n" diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt index dc7ec36a9e..8a0581917d 100644 --- a/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt +++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs.txt @@ -11,17 +11,17 @@ │ @ InterpolatedStringNode (location: (1,4)-(1,12)) │ ├── opening_loc: (1,4)-(1,12) = "<<~\"EOF\"" │ ├── parts: (length: 2) - │ │ ├── @ StringNode (location: (2,0)-(2,0)) + │ │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (2,0)-(2,0) = " blah blah\n" + │ │ │ ├── content_loc: (2,0)-(3,0) = " blah blah\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "blah blah\n" - │ │ └── @ StringNode (location: (3,0)-(3,0)) + │ │ └── @ StringNode (location: (3,0)-(4,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (3,0)-(3,0) = "\t blah blah\n" + │ │ ├── content_loc: (3,0)-(4,0) = "\t blah blah\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: " blah blah\n" - │ └── closing_loc: (4,0)-(4,0) = " EOF\n" + │ └── closing_loc: (4,0)-(5,0) = " EOF\n" └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt index 9d0962371d..af85f11e68 100644 --- a/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt +++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_tabs_extra.txt @@ -11,17 +11,17 @@ │ @ InterpolatedStringNode (location: (1,4)-(1,12)) │ ├── opening_loc: (1,4)-(1,12) = "<<~\"EOF\"" │ ├── parts: (length: 2) - │ │ ├── @ StringNode (location: (2,0)-(2,0)) + │ │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (2,0)-(2,0) = " blah blah\n" + │ │ │ ├── content_loc: (2,0)-(3,0) = " blah blah\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "blah blah\n" - │ │ └── @ StringNode (location: (3,0)-(3,0)) + │ │ └── @ StringNode (location: (3,0)-(4,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (3,0)-(3,0) = " \tblah blah\n" + │ │ ├── content_loc: (3,0)-(4,0) = " \tblah blah\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\tblah blah\n" - │ └── closing_loc: (4,0)-(4,0) = " EOF\n" + │ └── closing_loc: (4,0)-(5,0) = " EOF\n" └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt b/test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt index 1d93f974eb..3cba13a968 100644 --- a/test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt +++ b/test/prism/snapshots/seattlerb/heredoc_squiggly_visually_blank_lines.txt @@ -11,23 +11,23 @@ │ @ InterpolatedStringNode (location: (1,4)-(1,10)) │ ├── opening_loc: (1,4)-(1,10) = "<<~EOF" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (2,0)-(2,0)) + │ │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (2,0)-(2,0) = " x\n" + │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "x\n" - │ │ ├── @ StringNode (location: (3,0)-(3,0)) + │ │ ├── @ StringNode (location: (3,0)-(4,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (3,0)-(3,0) = " \n" + │ │ │ ├── content_loc: (3,0)-(4,0) = " \n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── @ StringNode (location: (4,0)-(4,0)) + │ │ └── @ StringNode (location: (4,0)-(5,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (4,0)-(4,0) = " z\n" + │ │ ├── content_loc: (4,0)-(5,0) = " z\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "z\n" - │ └── closing_loc: (5,0)-(5,0) = "EOF\n" + │ └── closing_loc: (5,0)-(6,0) = "EOF\n" └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt b/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt index bd99a60015..f6ab13617a 100644 --- a/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt +++ b/test/prism/snapshots/seattlerb/heredoc_trailing_slash_continued_call.txt @@ -8,8 +8,8 @@ │ @ StringNode (location: (1,0)-(1,5)) │ ├── flags: ∅ │ ├── opening_loc: (1,0)-(1,5) = "<<END" - │ ├── content_loc: (2,0)-(2,0) = "blah\n" - │ ├── closing_loc: (3,0)-(3,0) = "END\n" + │ ├── content_loc: (2,0)-(3,0) = "blah\n" + │ ├── closing_loc: (3,0)-(4,0) = "END\n" │ └── unescaped: "blah\n" ├── call_operator_loc: (4,0)-(4,1) = "." ├── message_loc: (4,1)-(4,6) = "strip" diff --git a/test/prism/snapshots/seattlerb/heredoc_unicode.txt b/test/prism/snapshots/seattlerb/heredoc_unicode.txt index cf05249d7d..2c72854324 100644 --- a/test/prism/snapshots/seattlerb/heredoc_unicode.txt +++ b/test/prism/snapshots/seattlerb/heredoc_unicode.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,9)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,9) = "<<OOTPÜT" - ├── content_loc: (2,0)-(2,0) = ".\n" - ├── closing_loc: (3,0)-(3,0) = "OOTPÜT\n" + ├── content_loc: (2,0)-(3,0) = ".\n" + ├── closing_loc: (3,0)-(4,0) = "OOTPÜT\n" └── unescaped: ".\n" diff --git a/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes.txt b/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes.txt index c2f9bacf34..43bb8d5ea8 100644 --- a/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes.txt +++ b/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,5)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,5) = "<<EOS" - ├── content_loc: (2,0)-(3,0) = "foo\\rbar\nbaz\\r\n" - ├── closing_loc: (4,0)-(4,0) = "EOS\n" + ├── content_loc: (2,0)-(4,0) = "foo\\rbar\nbaz\\r\n" + ├── closing_loc: (4,0)-(5,0) = "EOS\n" └── unescaped: "foo\rbar\nbaz\r\n" diff --git a/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes_windows.txt b/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes_windows.txt index 02cbf2d751..21802c5707 100644 --- a/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes_windows.txt +++ b/test/prism/snapshots/seattlerb/heredoc_with_carriage_return_escapes_windows.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,5)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,5) = "<<EOS" - ├── content_loc: (2,0)-(3,0) = "foo\\rbar\r\nbaz\\r\r\n" - ├── closing_loc: (4,0)-(4,0) = "EOS\r\n" + ├── content_loc: (2,0)-(4,0) = "foo\\rbar\r\nbaz\\r\r\n" + ├── closing_loc: (4,0)-(5,0) = "EOS\r\n" └── unescaped: "foo\rbar\r\nbaz\r\r\n" diff --git a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt index 66e83955b2..dca03e71b0 100644 --- a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt +++ b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_horrible_mix.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,7)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,7) = "<<'eot'" - ├── content_loc: (2,0)-(2,0) = "body\r\n" - ├── closing_loc: (3,0)-(3,0) = "eot\n" + ├── content_loc: (2,0)-(3,0) = "body\r\n" + ├── closing_loc: (3,0)-(4,0) = "eot\n" └── unescaped: "body\r\n" diff --git a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns.txt b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns.txt index 1873c71d87..93fa1a1687 100644 --- a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns.txt +++ b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,5)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,5) = "<<EOS" - ├── content_loc: (2,0)-(3,0) = "foo\rbar\r\nbaz\n" - ├── closing_loc: (4,0)-(4,0) = "EOS\n" + ├── content_loc: (2,0)-(4,0) = "foo\rbar\r\nbaz\n" + ├── closing_loc: (4,0)-(5,0) = "EOS\n" └── unescaped: "foo\rbar\r\nbaz\n" diff --git a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns_windows.txt b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns_windows.txt index 9473acb636..98b6e3fe11 100644 --- a/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns_windows.txt +++ b/test/prism/snapshots/seattlerb/heredoc_with_extra_carriage_returns_windows.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,5)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,5) = "<<EOS" - ├── content_loc: (2,0)-(3,0) = "foo\rbar\r\r\nbaz\r\n" - ├── closing_loc: (4,0)-(4,0) = "EOS\r\n" + ├── content_loc: (2,0)-(4,0) = "foo\rbar\r\r\nbaz\r\n" + ├── closing_loc: (4,0)-(5,0) = "EOS\r\n" └── unescaped: "foo\rbar\r\r\nbaz\r\n" diff --git a/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt b/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt index af8d5f697d..0067e49809 100644 --- a/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt +++ b/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes.txt @@ -17,10 +17,10 @@ │ │ └── variable: │ │ @ InstanceVariableReadNode (location: (2,6)-(2,10)) │ │ └── name: :@bar - │ └── @ StringNode (location: (2,10)-(2,0)) + │ └── @ StringNode (location: (2,10)-(3,0)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (2,10)-(2,0) = "\n" + │ ├── content_loc: (2,10)-(3,0) = "\n" │ ├── closing_loc: ∅ │ └── unescaped: "\n" - └── closing_loc: (3,0)-(3,0) = "EOS\n" + └── closing_loc: (3,0)-(4,0) = "EOS\n" diff --git a/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt b/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt index d1b51850a9..dc8f8ae6d6 100644 --- a/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt +++ b/test/prism/snapshots/seattlerb/heredoc_with_interpolation_and_carriage_return_escapes_windows.txt @@ -17,10 +17,10 @@ │ │ └── variable: │ │ @ InstanceVariableReadNode (location: (2,6)-(2,10)) │ │ └── name: :@bar - │ └── @ StringNode (location: (2,10)-(2,0)) + │ └── @ StringNode (location: (2,10)-(3,0)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (2,10)-(2,0) = "\r\n" + │ ├── content_loc: (2,10)-(3,0) = "\r\n" │ ├── closing_loc: ∅ │ └── unescaped: "\r\n" - └── closing_loc: (3,0)-(3,0) = "EOS\r\n" + └── closing_loc: (3,0)-(4,0) = "EOS\r\n" diff --git a/test/prism/snapshots/seattlerb/heredoc_with_not_global_interpolation.txt b/test/prism/snapshots/seattlerb/heredoc_with_not_global_interpolation.txt index c656ce4eec..6e1648f659 100644 --- a/test/prism/snapshots/seattlerb/heredoc_with_not_global_interpolation.txt +++ b/test/prism/snapshots/seattlerb/heredoc_with_not_global_interpolation.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,10)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,10) = "<<-HEREDOC" - ├── content_loc: (2,0)-(2,0) = "\#${\n" - ├── closing_loc: (3,0)-(3,0) = "HEREDOC\n" + ├── content_loc: (2,0)-(3,0) = "\#${\n" + ├── closing_loc: (3,0)-(4,0) = "HEREDOC\n" └── unescaped: "\#${\n" diff --git a/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns.txt b/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns.txt index 8043896a9e..6771f4afd7 100644 --- a/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns.txt +++ b/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,5)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,5) = "<<EOS" - ├── content_loc: (2,0)-(4,0) = "\r\n\r\r\n\\r\n" - ├── closing_loc: (5,0)-(5,0) = "EOS\n" + ├── content_loc: (2,0)-(5,0) = "\r\n\r\r\n\\r\n" + ├── closing_loc: (5,0)-(6,0) = "EOS\n" └── unescaped: "\r\n\r\r\n\r\n" diff --git a/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns_windows.txt b/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns_windows.txt index 5e62ba4230..b0f5d369dc 100644 --- a/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns_windows.txt +++ b/test/prism/snapshots/seattlerb/heredoc_with_only_carriage_returns_windows.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,5)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,5) = "<<EOS" - ├── content_loc: (2,0)-(4,0) = "\r\r\n\r\r\r\n\\r\r\n" - ├── closing_loc: (5,0)-(5,0) = "EOS\r\n" + ├── content_loc: (2,0)-(5,0) = "\r\r\n\r\r\r\n\\r\r\n" + ├── closing_loc: (5,0)-(6,0) = "EOS\r\n" └── unescaped: "\r\r\n\r\r\r\n\r\r\n" diff --git a/test/prism/snapshots/seattlerb/label_vs_string.txt b/test/prism/snapshots/seattlerb/label_vs_string.txt index 692b806620..6160db7bc8 100644 --- a/test/prism/snapshots/seattlerb/label_vs_string.txt +++ b/test/prism/snapshots/seattlerb/label_vs_string.txt @@ -24,7 +24,7 @@ │ │ └── @ StringNode (location: (1,8)-(2,1)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (1,8)-(1,9) = "'" - │ │ ├── content_loc: (1,9)-(1,0) = ":\n" + │ │ ├── content_loc: (1,9)-(2,0) = ":\n" │ │ ├── closing_loc: (2,0)-(2,1) = "'" │ │ └── unescaped: ":\n" │ └── flags: ∅ diff --git a/test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt b/test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt index 6f881c15f9..4415cbcc1b 100644 --- a/test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt +++ b/test/prism/snapshots/seattlerb/parse_line_dstr_soft_newline.txt @@ -6,10 +6,10 @@ ├── @ InterpolatedStringNode (location: (1,0)-(3,2)) │ ├── opening_loc: (1,0)-(1,1) = "\"" │ ├── parts: (length: 2) - │ │ ├── @ StringNode (location: (1,1)-(1,0)) + │ │ ├── @ StringNode (location: (1,1)-(2,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (1,1)-(1,0) = "a\n" + │ │ │ ├── content_loc: (1,1)-(2,0) = "a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" │ │ └── @ EmbeddedStatementsNode (location: (2,0)-(3,1)) diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc.txt index 1df2643c24..daf72f4f41 100644 --- a/test/prism/snapshots/seattlerb/parse_line_heredoc.txt +++ b/test/prism/snapshots/seattlerb/parse_line_heredoc.txt @@ -13,8 +13,8 @@ │ │ │ @ StringNode (location: (1,15)-(1,25)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (1,15)-(1,25) = "<<-HEREDOC" - │ │ │ ├── content_loc: (2,0)-(2,0) = " very long string\n" - │ │ │ ├── closing_loc: (3,0)-(3,0) = " HEREDOC\n" + │ │ │ ├── content_loc: (2,0)-(3,0) = " very long string\n" + │ │ │ ├── closing_loc: (3,0)-(4,0) = " HEREDOC\n" │ │ │ └── unescaped: " very long string\n" │ │ ├── call_operator_loc: (1,25)-(1,26) = "." │ │ ├── message_loc: (1,26)-(1,31) = "strip" diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt index 84efb8ead7..ab7437d711 100644 --- a/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt +++ b/test/prism/snapshots/seattlerb/parse_line_heredoc_evstr.txt @@ -6,10 +6,10 @@ └── @ InterpolatedStringNode (location: (1,0)-(1,4)) ├── opening_loc: (1,0)-(1,4) = "<<-A" ├── parts: (length: 3) - │ ├── @ StringNode (location: (2,0)-(2,0)) + │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (2,0)-(2,0) = "a\n" + │ │ ├── content_loc: (2,0)-(3,0) = "a\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "a\n" │ ├── @ EmbeddedStatementsNode (location: (3,0)-(3,4)) @@ -28,10 +28,10 @@ │ │ │ ├── flags: variable_call │ │ │ └── name: :b │ │ └── closing_loc: (3,3)-(3,4) = "}" - │ └── @ StringNode (location: (3,4)-(3,0)) + │ └── @ StringNode (location: (3,4)-(4,0)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (3,4)-(3,0) = "\n" + │ ├── content_loc: (3,4)-(4,0) = "\n" │ ├── closing_loc: ∅ │ └── unescaped: "\n" - └── closing_loc: (4,0)-(4,0) = "A\n" + └── closing_loc: (4,0)-(5,0) = "A\n" diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt index 230de59dd6..ad0f0dfd99 100644 --- a/test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt +++ b/test/prism/snapshots/seattlerb/parse_line_heredoc_hardnewline.txt @@ -6,8 +6,8 @@ ├── @ StringNode (location: (1,0)-(1,8)) │ ├── flags: ∅ │ ├── opening_loc: (1,0)-(1,8) = "<<-EOFOO" - │ ├── content_loc: (2,0)-(2,0) = "\\n\\n\\n\\n\\n\\n\\n\\n\\n\n" - │ ├── closing_loc: (3,0)-(3,0) = "EOFOO\n" + │ ├── content_loc: (2,0)-(3,0) = "\\n\\n\\n\\n\\n\\n\\n\\n\\n\n" + │ ├── closing_loc: (3,0)-(4,0) = "EOFOO\n" │ └── unescaped: "\n\n\n\n\n\n\n\n\n\n" └── @ ClassNode (location: (5,0)-(6,3)) ├── locals: [] diff --git a/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt b/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt index 7fb7a08b9e..89b5ee41ad 100644 --- a/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt +++ b/test/prism/snapshots/seattlerb/parse_line_heredoc_regexp_chars.txt @@ -11,8 +11,8 @@ │ │ @ StringNode (location: (1,15)-(1,22)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (1,15)-(1,22) = "<<-\"^D\"" - │ │ ├── content_loc: (2,0)-(2,0) = " very long string\n" - │ │ ├── closing_loc: (3,0)-(3,0) = " ^D\n" + │ │ ├── content_loc: (2,0)-(3,0) = " very long string\n" + │ │ ├── closing_loc: (3,0)-(4,0) = " ^D\n" │ │ └── unescaped: " very long string\n" │ └── operator_loc: (1,13)-(1,14) = "=" └── @ CallNode (location: (4,6)-(4,17)) diff --git a/test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt b/test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt index 02830644e3..31cc0941ee 100644 --- a/test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt +++ b/test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(2,1)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,3) = "%q{" - ├── content_loc: (1,3)-(1,0) = " \\\n" + ├── content_loc: (1,3)-(2,0) = " \\\n" ├── closing_loc: (2,0)-(2,1) = "}" └── unescaped: " \\\n" diff --git a/test/prism/snapshots/seattlerb/pct_nl.txt b/test/prism/snapshots/seattlerb/pct_nl.txt index 147f8d4ce8..1009fcb51d 100644 --- a/test/prism/snapshots/seattlerb/pct_nl.txt +++ b/test/prism/snapshots/seattlerb/pct_nl.txt @@ -1,17 +1,17 @@ -@ ProgramNode (location: (1,0)-(2,0)) +@ ProgramNode (location: (1,0)-(3,0)) ├── locals: [:x] └── statements: - @ StatementsNode (location: (1,0)-(2,0)) + @ StatementsNode (location: (1,0)-(3,0)) └── body: (length: 1) - └── @ LocalVariableWriteNode (location: (1,0)-(2,0)) + └── @ LocalVariableWriteNode (location: (1,0)-(3,0)) ├── name: :x ├── depth: 0 ├── name_loc: (1,0)-(1,1) = "x" ├── value: - │ @ StringNode (location: (1,4)-(2,0)) + │ @ StringNode (location: (1,4)-(3,0)) │ ├── flags: ∅ - │ ├── opening_loc: (1,4)-(1,0) = "%\n" - │ ├── content_loc: (2,0)-(1,0) = "" - │ ├── closing_loc: (2,0)-(2,0) = "\n" + │ ├── opening_loc: (1,4)-(2,0) = "%\n" + │ ├── content_loc: (2,0)-(2,0) = "" + │ ├── closing_loc: (2,0)-(3,0) = "\n" │ └── unescaped: "" └── operator_loc: (1,2)-(1,3) = "=" diff --git a/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt b/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt index 0b1fd48eca..74ad9360ab 100644 --- a/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt +++ b/test/prism/snapshots/seattlerb/pct_w_heredoc_interp_nested.txt @@ -22,8 +22,8 @@ │ │ │ │ └── @ StringNode (location: (1,8)-(1,11)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (1,8)-(1,11) = "<<A" - │ │ │ │ ├── content_loc: (2,0)-(2,0) = "2\n" - │ │ │ │ ├── closing_loc: (3,0)-(3,0) = "A\n" + │ │ │ │ ├── content_loc: (2,0)-(3,0) = "2\n" + │ │ │ │ ├── closing_loc: (3,0)-(4,0) = "A\n" │ │ │ │ └── unescaped: "2\n" │ │ │ └── closing_loc: (1,11)-(1,12) = "}" │ │ └── closing_loc: ∅ diff --git a/test/prism/snapshots/seattlerb/str_double_newline.txt b/test/prism/snapshots/seattlerb/str_double_newline.txt index 6f5aedc3c7..0b5d655610 100644 --- a/test/prism/snapshots/seattlerb/str_double_newline.txt +++ b/test/prism/snapshots/seattlerb/str_double_newline.txt @@ -14,7 +14,7 @@ │ │ │ └── @ StringNode (location: (1,2)-(2,1)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (1,2)-(1,3) = "\"" - │ │ │ ├── content_loc: (1,3)-(1,0) = "\n" + │ │ │ ├── content_loc: (1,3)-(2,0) = "\n" │ │ │ ├── closing_loc: (2,0)-(2,1) = "\"" │ │ │ └── unescaped: "\n" │ │ └── flags: ∅ diff --git a/test/prism/snapshots/seattlerb/str_heredoc_interp.txt b/test/prism/snapshots/seattlerb/str_heredoc_interp.txt index 32ab636d77..164926cdf9 100644 --- a/test/prism/snapshots/seattlerb/str_heredoc_interp.txt +++ b/test/prism/snapshots/seattlerb/str_heredoc_interp.txt @@ -22,10 +22,10 @@ │ │ │ ├── flags: variable_call │ │ │ └── name: :x │ │ └── closing_loc: (2,3)-(2,4) = "}" - │ └── @ StringNode (location: (2,4)-(3,0)) + │ └── @ StringNode (location: (2,4)-(4,0)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (2,4)-(3,0) = "\nblah2\n" + │ ├── content_loc: (2,4)-(4,0) = "\nblah2\n" │ ├── closing_loc: ∅ │ └── unescaped: "\nblah2\n" - └── closing_loc: (4,0)-(4,0) = "\n" + └── closing_loc: (4,0)-(5,0) = "\n" diff --git a/test/prism/snapshots/seattlerb/str_single_newline.txt b/test/prism/snapshots/seattlerb/str_single_newline.txt index 48323fb1a7..a4725a50aa 100644 --- a/test/prism/snapshots/seattlerb/str_single_newline.txt +++ b/test/prism/snapshots/seattlerb/str_single_newline.txt @@ -14,7 +14,7 @@ │ │ │ └── @ StringNode (location: (1,2)-(2,1)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (1,2)-(1,3) = "'" - │ │ │ ├── content_loc: (1,3)-(1,0) = "\n" + │ │ │ ├── content_loc: (1,3)-(2,0) = "\n" │ │ │ ├── closing_loc: (2,0)-(2,1) = "'" │ │ │ └── unescaped: "\n" │ │ └── flags: ∅ diff --git a/test/prism/snapshots/single_quote_heredocs.txt b/test/prism/snapshots/single_quote_heredocs.txt index cea79aa6b7..429c9daf11 100644 --- a/test/prism/snapshots/single_quote_heredocs.txt +++ b/test/prism/snapshots/single_quote_heredocs.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,8)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,8) = "<<-'EOS'" - ├── content_loc: (2,0)-(2,0) = " cd L:\\Work\\MG3710IQPro\\Develop\n" - ├── closing_loc: (3,0)-(3,0) = "EOS\n" + ├── content_loc: (2,0)-(3,0) = " cd L:\\Work\\MG3710IQPro\\Develop\n" + ├── closing_loc: (3,0)-(4,0) = "EOS\n" └── unescaped: " cd L:\\Work\\MG3710IQPro\\Develop\n" diff --git a/test/prism/snapshots/spanning_heredoc.txt b/test/prism/snapshots/spanning_heredoc.txt index 2f0638fad2..e568dc2572 100644 --- a/test/prism/snapshots/spanning_heredoc.txt +++ b/test/prism/snapshots/spanning_heredoc.txt @@ -16,8 +16,8 @@ │ │ │ │ @ StringNode (location: (4,3)-(4,7)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (4,3)-(4,7) = "<<-A" - │ │ │ │ ├── content_loc: (5,0)-(5,0) = "a\n" - │ │ │ │ ├── closing_loc: (6,0)-(6,0) = "A\n" + │ │ │ │ ├── content_loc: (5,0)-(6,0) = "a\n" + │ │ │ │ ├── closing_loc: (6,0)-(7,0) = "A\n" │ │ │ │ └── unescaped: "a\n" │ │ │ ├── call_operator_loc: (4,7)-(4,8) = "." │ │ │ ├── message_loc: (4,8)-(4,12) = "gsub" @@ -69,8 +69,8 @@ │ │ │ ├── @ StringNode (location: (10,3)-(10,7)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (10,3)-(10,7) = "<<-A" - │ │ │ │ ├── content_loc: (11,0)-(11,0) = "c\n" - │ │ │ │ ├── closing_loc: (12,0)-(12,0) = "A\n" + │ │ │ │ ├── content_loc: (11,0)-(12,0) = "c\n" + │ │ │ │ ├── closing_loc: (12,0)-(13,0) = "A\n" │ │ │ │ └── unescaped: "c\n" │ │ │ └── @ InterpolatedStringNode (location: (10,9)-(13,2)) │ │ │ ├── opening_loc: (10,9)-(10,10) = "\"" @@ -104,8 +104,8 @@ │ │ │ ├── @ StringNode (location: (16,3)-(16,7)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (16,3)-(16,7) = "<<-A" - │ │ │ │ ├── content_loc: (17,0)-(17,0) = "e\n" - │ │ │ │ ├── closing_loc: (18,0)-(18,0) = "A\n" + │ │ │ │ ├── content_loc: (17,0)-(18,0) = "e\n" + │ │ │ │ ├── closing_loc: (18,0)-(19,0) = "A\n" │ │ │ │ └── unescaped: "e\n" │ │ │ └── @ InterpolatedStringNode (location: (16,9)-(19,2)) │ │ │ ├── opening_loc: (16,9)-(16,12) = "%q[" @@ -139,8 +139,8 @@ │ │ │ ├── @ StringNode (location: (22,3)-(22,7)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (22,3)-(22,7) = "<<-A" - │ │ │ │ ├── content_loc: (23,0)-(23,0) = "g\n" - │ │ │ │ ├── closing_loc: (24,0)-(24,0) = "A\n" + │ │ │ │ ├── content_loc: (23,0)-(24,0) = "g\n" + │ │ │ │ ├── closing_loc: (24,0)-(25,0) = "A\n" │ │ │ │ └── unescaped: "g\n" │ │ │ └── @ InterpolatedStringNode (location: (22,9)-(25,2)) │ │ │ ├── opening_loc: (22,9)-(22,12) = "%Q[" @@ -174,8 +174,8 @@ │ │ │ ├── @ StringNode (location: (28,3)-(28,7)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (28,3)-(28,7) = "<<-A" - │ │ │ │ ├── content_loc: (29,0)-(29,0) = "i\n" - │ │ │ │ ├── closing_loc: (30,0)-(30,0) = "A\n" + │ │ │ │ ├── content_loc: (29,0)-(30,0) = "i\n" + │ │ │ │ ├── closing_loc: (30,0)-(31,0) = "A\n" │ │ │ │ └── unescaped: "i\n" │ │ │ └── @ ArrayNode (location: (28,9)-(31,2)) │ │ │ ├── elements: (length: 2) @@ -209,8 +209,8 @@ │ │ │ ├── @ StringNode (location: (35,3)-(35,7)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (35,3)-(35,7) = "<<-A" - │ │ │ │ ├── content_loc: (36,0)-(36,0) = "k\n" - │ │ │ │ ├── closing_loc: (37,0)-(37,0) = "A\n" + │ │ │ │ ├── content_loc: (36,0)-(37,0) = "k\n" + │ │ │ │ ├── closing_loc: (37,0)-(38,0) = "A\n" │ │ │ │ └── unescaped: "k\n" │ │ │ └── @ ArrayNode (location: (35,9)-(38,2)) │ │ │ ├── elements: (length: 1) @@ -248,8 +248,8 @@ │ │ │ ├── @ StringNode (location: (41,3)-(41,7)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (41,3)-(41,7) = "<<-A" - │ │ │ │ ├── content_loc: (42,0)-(42,0) = "m\n" - │ │ │ │ ├── closing_loc: (43,0)-(43,0) = "A\n" + │ │ │ │ ├── content_loc: (42,0)-(43,0) = "m\n" + │ │ │ │ ├── closing_loc: (43,0)-(44,0) = "A\n" │ │ │ │ └── unescaped: "m\n" │ │ │ └── @ ArrayNode (location: (41,9)-(44,2)) │ │ │ ├── elements: (length: 2) @@ -281,8 +281,8 @@ │ │ ├── @ StringNode (location: (48,3)-(48,7)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (48,3)-(48,7) = "<<-A" - │ │ │ ├── content_loc: (49,0)-(49,0) = "o\n" - │ │ │ ├── closing_loc: (50,0)-(50,0) = "A\n" + │ │ │ ├── content_loc: (49,0)-(50,0) = "o\n" + │ │ │ ├── closing_loc: (50,0)-(51,0) = "A\n" │ │ │ └── unescaped: "o\n" │ │ └── @ ArrayNode (location: (48,9)-(51,2)) │ │ ├── elements: (length: 1) diff --git a/test/prism/snapshots/tilde_heredocs.txt b/test/prism/snapshots/tilde_heredocs.txt index 3f9ca04707..fb09e075e1 100644 --- a/test/prism/snapshots/tilde_heredocs.txt +++ b/test/prism/snapshots/tilde_heredocs.txt @@ -6,10 +6,10 @@ ├── @ InterpolatedStringNode (location: (1,0)-(1,6)) │ ├── opening_loc: (1,0)-(1,6) = "<<~EOF" │ ├── parts: (length: 4) - │ │ ├── @ StringNode (location: (2,0)-(2,0)) + │ │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (2,0)-(2,0) = " a\n" + │ │ │ ├── content_loc: (2,0)-(3,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: " a\n" │ │ ├── @ EmbeddedStatementsNode (location: (3,0)-(3,4)) @@ -20,47 +20,47 @@ │ │ │ │ └── @ IntegerNode (location: (3,2)-(3,3)) │ │ │ │ └── flags: decimal │ │ │ └── closing_loc: (3,3)-(3,4) = "}" - │ │ ├── @ StringNode (location: (3,4)-(3,0)) + │ │ ├── @ StringNode (location: (3,4)-(4,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (3,4)-(3,0) = "\n" + │ │ │ ├── content_loc: (3,4)-(4,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── @ StringNode (location: (4,0)-(4,0)) + │ │ └── @ StringNode (location: (4,0)-(5,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (4,0)-(4,0) = " a\n" + │ │ ├── content_loc: (4,0)-(5,0) = " a\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: " a\n" - │ └── closing_loc: (5,0)-(5,0) = "EOF\n" + │ └── closing_loc: (5,0)-(6,0) = "EOF\n" ├── @ StringNode (location: (7,0)-(7,6)) │ ├── flags: ∅ │ ├── opening_loc: (7,0)-(7,6) = "<<~EOF" - │ ├── content_loc: (8,0)-(8,0) = " a\n" - │ ├── closing_loc: (9,0)-(9,0) = "EOF\n" + │ ├── content_loc: (8,0)-(9,0) = " a\n" + │ ├── closing_loc: (9,0)-(10,0) = "EOF\n" │ └── unescaped: "a\n" ├── @ InterpolatedStringNode (location: (11,0)-(11,6)) │ ├── opening_loc: (11,0)-(11,6) = "<<~EOF" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (12,0)-(12,0)) + │ │ ├── @ StringNode (location: (12,0)-(13,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (12,0)-(12,0) = "\ta\n" + │ │ │ ├── content_loc: (12,0)-(13,0) = "\ta\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\ta\n" - │ │ ├── @ StringNode (location: (13,0)-(13,0)) + │ │ ├── @ StringNode (location: (13,0)-(14,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (13,0)-(13,0) = " b\n" + │ │ │ ├── content_loc: (13,0)-(14,0) = " b\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "b\n" - │ │ └── @ StringNode (location: (14,0)-(14,0)) + │ │ └── @ StringNode (location: (14,0)-(15,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (14,0)-(14,0) = "\t\tc\n" + │ │ ├── content_loc: (14,0)-(15,0) = "\t\tc\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\t\tc\n" - │ └── closing_loc: (15,0)-(15,0) = "EOF\n" + │ └── closing_loc: (15,0)-(16,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (17,0)-(17,6)) │ ├── opening_loc: (17,0)-(17,6) = "<<~EOF" │ ├── parts: (length: 2) @@ -72,13 +72,13 @@ │ │ │ │ └── @ IntegerNode (location: (18,4)-(18,5)) │ │ │ │ └── flags: decimal │ │ │ └── closing_loc: (18,5)-(18,6) = "}" - │ │ └── @ StringNode (location: (18,6)-(18,0)) + │ │ └── @ StringNode (location: (18,6)-(19,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (18,6)-(18,0) = " a\n" + │ │ ├── content_loc: (18,6)-(19,0) = " a\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: " a\n" - │ └── closing_loc: (19,0)-(19,0) = "EOF\n" + │ └── closing_loc: (19,0)-(20,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (21,0)-(21,6)) │ ├── opening_loc: (21,0)-(21,6) = "<<~EOF" │ ├── parts: (length: 3) @@ -96,20 +96,20 @@ │ │ │ │ └── @ IntegerNode (location: (22,6)-(22,7)) │ │ │ │ └── flags: decimal │ │ │ └── closing_loc: (22,7)-(22,8) = "}" - │ │ └── @ StringNode (location: (22,8)-(22,0)) + │ │ └── @ StringNode (location: (22,8)-(23,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (22,8)-(22,0) = "\n" + │ │ ├── content_loc: (22,8)-(23,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ └── closing_loc: (23,0)-(23,0) = "EOF\n" + │ └── closing_loc: (23,0)-(24,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (25,0)-(25,6)) │ ├── opening_loc: (25,0)-(25,6) = "<<~EOF" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (26,0)-(26,0)) + │ │ ├── @ StringNode (location: (26,0)-(27,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (26,0)-(26,0) = " a\n" + │ │ │ ├── content_loc: (26,0)-(27,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: " a\n" │ │ ├── @ EmbeddedStatementsNode (location: (27,1)-(27,5)) @@ -120,20 +120,20 @@ │ │ │ │ └── @ IntegerNode (location: (27,3)-(27,4)) │ │ │ │ └── flags: decimal │ │ │ └── closing_loc: (27,4)-(27,5) = "}" - │ │ └── @ StringNode (location: (27,5)-(27,0)) + │ │ └── @ StringNode (location: (27,5)-(28,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (27,5)-(27,0) = "\n" + │ │ ├── content_loc: (27,5)-(28,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ └── closing_loc: (28,0)-(28,0) = "EOF\n" + │ └── closing_loc: (28,0)-(29,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (30,0)-(30,6)) │ ├── opening_loc: (30,0)-(30,6) = "<<~EOF" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (31,0)-(31,0)) + │ │ ├── @ StringNode (location: (31,0)-(32,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (31,0)-(31,0) = " a\n" + │ │ │ ├── content_loc: (31,0)-(32,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" │ │ ├── @ EmbeddedStatementsNode (location: (32,2)-(32,6)) @@ -144,200 +144,200 @@ │ │ │ │ └── @ IntegerNode (location: (32,4)-(32,5)) │ │ │ │ └── flags: decimal │ │ │ └── closing_loc: (32,5)-(32,6) = "}" - │ │ └── @ StringNode (location: (32,6)-(32,0)) + │ │ └── @ StringNode (location: (32,6)-(33,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (32,6)-(32,0) = "\n" + │ │ ├── content_loc: (32,6)-(33,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ └── closing_loc: (33,0)-(33,0) = "EOF\n" + │ └── closing_loc: (33,0)-(34,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (35,0)-(35,6)) │ ├── opening_loc: (35,0)-(35,6) = "<<~EOF" │ ├── parts: (length: 2) - │ │ ├── @ StringNode (location: (36,0)-(36,0)) + │ │ ├── @ StringNode (location: (36,0)-(37,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (36,0)-(36,0) = " a\n" + │ │ │ ├── content_loc: (36,0)-(37,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" - │ │ └── @ StringNode (location: (37,0)-(37,0)) + │ │ └── @ StringNode (location: (37,0)-(38,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (37,0)-(37,0) = " b\n" + │ │ ├── content_loc: (37,0)-(38,0) = " b\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b\n" - │ └── closing_loc: (38,0)-(38,0) = "EOF\n" + │ └── closing_loc: (38,0)-(39,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (40,0)-(40,6)) │ ├── opening_loc: (40,0)-(40,6) = "<<~EOF" │ ├── parts: (length: 2) - │ │ ├── @ StringNode (location: (41,0)-(41,0)) + │ │ ├── @ StringNode (location: (41,0)-(42,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (41,0)-(41,0) = " a\n" + │ │ │ ├── content_loc: (41,0)-(42,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" - │ │ └── @ StringNode (location: (42,0)-(42,0)) + │ │ └── @ StringNode (location: (42,0)-(43,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (42,0)-(42,0) = " b\n" + │ │ ├── content_loc: (42,0)-(43,0) = " b\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: " b\n" - │ └── closing_loc: (43,0)-(43,0) = "EOF\n" + │ └── closing_loc: (43,0)-(44,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (45,0)-(45,6)) │ ├── opening_loc: (45,0)-(45,6) = "<<~EOF" │ ├── parts: (length: 2) - │ │ ├── @ StringNode (location: (46,0)-(46,0)) + │ │ ├── @ StringNode (location: (46,0)-(47,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (46,0)-(46,0) = "\t\t\ta\n" + │ │ │ ├── content_loc: (46,0)-(47,0) = "\t\t\ta\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\ta\n" - │ │ └── @ StringNode (location: (47,0)-(47,0)) + │ │ └── @ StringNode (location: (47,0)-(48,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (47,0)-(47,0) = "\t\tb\n" + │ │ ├── content_loc: (47,0)-(48,0) = "\t\tb\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b\n" - │ └── closing_loc: (48,0)-(48,0) = "EOF\n" + │ └── closing_loc: (48,0)-(49,0) = "EOF\n" ├── @ StringNode (location: (50,0)-(50,8)) │ ├── flags: ∅ │ ├── opening_loc: (50,0)-(50,8) = "<<~'EOF'" - │ ├── content_loc: (51,0)-(51,0) = " a \#{1}\n" - │ ├── closing_loc: (52,0)-(52,0) = "EOF\n" + │ ├── content_loc: (51,0)-(52,0) = " a \#{1}\n" + │ ├── closing_loc: (52,0)-(53,0) = "EOF\n" │ └── unescaped: "a \#{1}\n" ├── @ InterpolatedStringNode (location: (54,0)-(54,6)) │ ├── opening_loc: (54,0)-(54,6) = "<<~EOF" │ ├── parts: (length: 2) - │ │ ├── @ StringNode (location: (55,0)-(55,0)) + │ │ ├── @ StringNode (location: (55,0)-(56,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (55,0)-(55,0) = "\ta\n" + │ │ │ ├── content_loc: (55,0)-(56,0) = "\ta\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" - │ │ └── @ StringNode (location: (56,0)-(56,0)) + │ │ └── @ StringNode (location: (56,0)-(57,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (56,0)-(56,0) = "\t b\n" + │ │ ├── content_loc: (56,0)-(57,0) = "\t b\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: " b\n" - │ └── closing_loc: (57,0)-(57,0) = "EOF\n" + │ └── closing_loc: (57,0)-(58,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (59,0)-(59,6)) │ ├── opening_loc: (59,0)-(59,6) = "<<~EOF" │ ├── parts: (length: 2) - │ │ ├── @ StringNode (location: (60,0)-(60,0)) + │ │ ├── @ StringNode (location: (60,0)-(61,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (60,0)-(60,0) = "\t a\n" + │ │ │ ├── content_loc: (60,0)-(61,0) = "\t a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: " a\n" - │ │ └── @ StringNode (location: (61,0)-(61,0)) + │ │ └── @ StringNode (location: (61,0)-(62,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (61,0)-(61,0) = "\tb\n" + │ │ ├── content_loc: (61,0)-(62,0) = "\tb\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b\n" - │ └── closing_loc: (62,0)-(62,0) = "EOF\n" + │ └── closing_loc: (62,0)-(63,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (64,0)-(64,6)) │ ├── opening_loc: (64,0)-(64,6) = "<<~EOF" │ ├── parts: (length: 2) - │ │ ├── @ StringNode (location: (65,0)-(65,0)) + │ │ ├── @ StringNode (location: (65,0)-(66,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (65,0)-(65,0) = " \ta\n" + │ │ │ ├── content_loc: (65,0)-(66,0) = " \ta\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" - │ │ └── @ StringNode (location: (66,0)-(66,0)) + │ │ └── @ StringNode (location: (66,0)-(67,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (66,0)-(66,0) = " b\n" + │ │ ├── content_loc: (66,0)-(67,0) = " b\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b\n" - │ └── closing_loc: (67,0)-(67,0) = "EOF\n" + │ └── closing_loc: (67,0)-(68,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (69,0)-(69,6)) │ ├── opening_loc: (69,0)-(69,6) = "<<~EOF" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (70,0)-(70,0)) + │ │ ├── @ StringNode (location: (70,0)-(71,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (70,0)-(70,0) = " a\n" + │ │ │ ├── content_loc: (70,0)-(71,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" - │ │ ├── @ StringNode (location: (71,0)-(71,0)) + │ │ ├── @ StringNode (location: (71,0)-(72,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (71,0)-(71,0) = "\n" + │ │ │ ├── content_loc: (71,0)-(72,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── @ StringNode (location: (72,0)-(72,0)) + │ │ └── @ StringNode (location: (72,0)-(73,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (72,0)-(72,0) = " b\n" + │ │ ├── content_loc: (72,0)-(73,0) = " b\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b\n" - │ └── closing_loc: (73,0)-(73,0) = "EOF\n" + │ └── closing_loc: (73,0)-(74,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (75,0)-(75,6)) │ ├── opening_loc: (75,0)-(75,6) = "<<~EOF" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (76,0)-(76,0)) + │ │ ├── @ StringNode (location: (76,0)-(77,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (76,0)-(76,0) = " a\n" + │ │ │ ├── content_loc: (76,0)-(77,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" - │ │ ├── @ StringNode (location: (77,0)-(77,0)) + │ │ ├── @ StringNode (location: (77,0)-(78,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (77,0)-(77,0) = "\n" + │ │ │ ├── content_loc: (77,0)-(78,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── @ StringNode (location: (78,0)-(78,0)) + │ │ └── @ StringNode (location: (78,0)-(79,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (78,0)-(78,0) = " b\n" + │ │ ├── content_loc: (78,0)-(79,0) = " b\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b\n" - │ └── closing_loc: (79,0)-(79,0) = "EOF\n" + │ └── closing_loc: (79,0)-(80,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (81,0)-(81,6)) │ ├── opening_loc: (81,0)-(81,6) = "<<~EOF" │ ├── parts: (length: 5) - │ │ ├── @ StringNode (location: (82,0)-(82,0)) + │ │ ├── @ StringNode (location: (82,0)-(83,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (82,0)-(82,0) = " a\n" + │ │ │ ├── content_loc: (82,0)-(83,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" - │ │ ├── @ StringNode (location: (83,0)-(83,0)) + │ │ ├── @ StringNode (location: (83,0)-(84,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (83,0)-(83,0) = "\n" + │ │ │ ├── content_loc: (83,0)-(84,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ ├── @ StringNode (location: (84,0)-(84,0)) + │ │ ├── @ StringNode (location: (84,0)-(85,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (84,0)-(84,0) = "\n" + │ │ │ ├── content_loc: (84,0)-(85,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ ├── @ StringNode (location: (85,0)-(85,0)) + │ │ ├── @ StringNode (location: (85,0)-(86,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (85,0)-(85,0) = "\n" + │ │ │ ├── content_loc: (85,0)-(86,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── @ StringNode (location: (86,0)-(86,0)) + │ │ └── @ StringNode (location: (86,0)-(87,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (86,0)-(86,0) = " b\n" + │ │ ├── content_loc: (86,0)-(87,0) = " b\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b\n" - │ └── closing_loc: (87,0)-(87,0) = "EOF\n" + │ └── closing_loc: (87,0)-(88,0) = "EOF\n" ├── @ InterpolatedStringNode (location: (89,0)-(89,6)) │ ├── opening_loc: (89,0)-(89,6) = "<<~EOF" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (90,0)-(90,0)) + │ │ ├── @ StringNode (location: (90,0)-(91,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (90,0)-(90,0) = "\n" + │ │ │ ├── content_loc: (90,0)-(91,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" │ │ ├── @ EmbeddedStatementsNode (location: (91,2)-(91,6)) @@ -348,13 +348,13 @@ │ │ │ │ └── @ IntegerNode (location: (91,4)-(91,5)) │ │ │ │ └── flags: decimal │ │ │ └── closing_loc: (91,5)-(91,6) = "}" - │ │ └── @ StringNode (location: (91,6)-(91,0)) + │ │ └── @ StringNode (location: (91,6)-(92,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (91,6)-(91,0) = "a\n" + │ │ ├── content_loc: (91,6)-(92,0) = "a\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "a\n" - │ └── closing_loc: (92,0)-(92,0) = " EOF\n" + │ └── closing_loc: (92,0)-(93,0) = " EOF\n" └── @ InterpolatedStringNode (location: (94,0)-(94,6)) ├── opening_loc: (94,0)-(94,6) = "<<~EOT" ├── parts: (length: 3) @@ -366,16 +366,16 @@ │ │ │ └── @ IntegerNode (location: (95,4)-(95,5)) │ │ │ └── flags: decimal │ │ └── closing_loc: (95,5)-(95,6) = "}" - │ ├── @ StringNode (location: (95,6)-(95,0)) + │ ├── @ StringNode (location: (95,6)-(96,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (95,6)-(95,0) = "\n" + │ │ ├── content_loc: (95,6)-(96,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ └── @ StringNode (location: (96,0)-(96,0)) + │ └── @ StringNode (location: (96,0)-(97,0)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (96,0)-(96,0) = "\tb\n" + │ ├── content_loc: (96,0)-(97,0) = "\tb\n" │ ├── closing_loc: ∅ │ └── unescaped: "\tb\n" - └── closing_loc: (97,0)-(97,0) = "EOT\n" + └── closing_loc: (97,0)-(98,0) = "EOT\n" diff --git a/test/prism/snapshots/unescaping.txt b/test/prism/snapshots/unescaping.txt index ee7c3759cb..ec30d4d4c6 100644 --- a/test/prism/snapshots/unescaping.txt +++ b/test/prism/snapshots/unescaping.txt @@ -28,6 +28,6 @@ └── @ StringNode (location: (7,0)-(7,7)) ├── flags: ∅ ├── opening_loc: (7,0)-(7,7) = "<<~HERE" - ├── content_loc: (8,0)-(8,0) = " \\c\#{1}\n" - ├── closing_loc: (9,0)-(9,0) = "HERE\n" + ├── content_loc: (8,0)-(9,0) = " \\c\#{1}\n" + ├── closing_loc: (9,0)-(10,0) = "HERE\n" └── unescaped: "\u0003{1}\n" diff --git a/test/prism/snapshots/unparser/corpus/literal/assignment.txt b/test/prism/snapshots/unparser/corpus/literal/assignment.txt index 1400bb6061..e1efbac5e4 100644 --- a/test/prism/snapshots/unparser/corpus/literal/assignment.txt +++ b/test/prism/snapshots/unparser/corpus/literal/assignment.txt @@ -897,13 +897,13 @@ │ │ │ │ ├── opening_loc: (40,2)-(40,4) = "\#{" │ │ │ │ ├── statements: ∅ │ │ │ │ └── closing_loc: (40,4)-(40,5) = "}" - │ │ │ └── @ StringNode (location: (40,5)-(40,0)) + │ │ │ └── @ StringNode (location: (40,5)-(41,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (40,5)-(40,0) = "\n" + │ │ │ ├── content_loc: (40,5)-(41,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── closing_loc: (41,0)-(41,0) = "HEREDOC\n" + │ │ └── closing_loc: (41,0)-(42,0) = "HEREDOC\n" │ └── operator_loc: (39,2)-(39,3) = "=" ├── @ CallNode (location: (42,0)-(42,14)) │ ├── receiver: @@ -929,13 +929,13 @@ │ │ │ │ │ ├── opening_loc: (43,2)-(43,4) = "\#{" │ │ │ │ │ ├── statements: ∅ │ │ │ │ │ └── closing_loc: (43,4)-(43,5) = "}" - │ │ │ │ └── @ StringNode (location: (43,5)-(43,0)) + │ │ │ │ └── @ StringNode (location: (43,5)-(44,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (43,5)-(43,0) = "\n" + │ │ │ │ ├── content_loc: (43,5)-(44,0) = "\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "\n" - │ │ │ └── closing_loc: (44,0)-(44,0) = "HEREDOC\n" + │ │ │ └── closing_loc: (44,0)-(45,0) = "HEREDOC\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -965,13 +965,13 @@ │ │ │ │ │ ├── opening_loc: (46,2)-(46,4) = "\#{" │ │ │ │ │ ├── statements: ∅ │ │ │ │ │ └── closing_loc: (46,4)-(46,5) = "}" - │ │ │ │ └── @ StringNode (location: (46,5)-(46,0)) + │ │ │ │ └── @ StringNode (location: (46,5)-(47,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (46,5)-(46,0) = "\n" + │ │ │ │ ├── content_loc: (46,5)-(47,0) = "\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "\n" - │ │ │ └── closing_loc: (47,0)-(47,0) = "HEREDOC\n" + │ │ │ └── closing_loc: (47,0)-(48,0) = "HEREDOC\n" │ │ └── flags: ∅ │ ├── closing_loc: (45,2)-(45,3) = "]" │ ├── block: ∅ @@ -1000,13 +1000,13 @@ │ │ │ │ │ ├── opening_loc: (49,2)-(49,4) = "\#{" │ │ │ │ │ ├── statements: ∅ │ │ │ │ │ └── closing_loc: (49,4)-(49,5) = "}" - │ │ │ │ └── @ StringNode (location: (49,5)-(49,0)) + │ │ │ │ └── @ StringNode (location: (49,5)-(50,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (49,5)-(49,0) = "\n" + │ │ │ │ ├── content_loc: (49,5)-(50,0) = "\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "\n" - │ │ │ └── closing_loc: (50,0)-(50,0) = "HEREDOC\n" + │ │ │ └── closing_loc: (50,0)-(51,0) = "HEREDOC\n" │ │ └── flags: ∅ │ ├── closing_loc: (48,12)-(48,13) = "]" │ ├── block: ∅ @@ -1041,10 +1041,10 @@ │ │ ├── opening_loc: (52,2)-(52,4) = "\#{" │ │ ├── statements: ∅ │ │ └── closing_loc: (52,4)-(52,5) = "}" - │ └── @ StringNode (location: (52,5)-(52,0)) + │ └── @ StringNode (location: (52,5)-(53,0)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (52,5)-(52,0) = "\n" + │ ├── content_loc: (52,5)-(53,0) = "\n" │ ├── closing_loc: ∅ │ └── unescaped: "\n" - └── closing_loc: (53,0)-(53,0) = "HEREDOC\n" + └── closing_loc: (53,0)-(54,0) = "HEREDOC\n" diff --git a/test/prism/snapshots/unparser/corpus/literal/block.txt b/test/prism/snapshots/unparser/corpus/literal/block.txt index 54ad868a85..2605b6a6b2 100644 --- a/test/prism/snapshots/unparser/corpus/literal/block.txt +++ b/test/prism/snapshots/unparser/corpus/literal/block.txt @@ -70,7 +70,7 @@ │ │ │ │ ├── optionals: (length: 0) │ │ │ │ ├── rest: │ │ │ │ │ @ RestParameterNode (location: (5,8)-(5,9)) - │ │ │ │ │ ├── name: nil + │ │ │ │ │ ├── name: ∅ │ │ │ │ │ ├── name_loc: ∅ │ │ │ │ │ └── operator_loc: (5,8)-(5,9) = "," │ │ │ │ ├── posts: (length: 0) @@ -105,7 +105,7 @@ │ │ │ │ ├── optionals: (length: 0) │ │ │ │ ├── rest: │ │ │ │ │ @ RestParameterNode (location: (7,8)-(7,9)) - │ │ │ │ │ ├── name: nil + │ │ │ │ │ ├── name: ∅ │ │ │ │ │ ├── name_loc: ∅ │ │ │ │ │ └── operator_loc: (7,8)-(7,9) = "," │ │ │ │ ├── posts: (length: 0) @@ -237,7 +237,7 @@ │ │ │ │ ├── optionals: (length: 0) │ │ │ │ ├── rest: │ │ │ │ │ @ RestParameterNode (location: (17,10)-(17,11)) - │ │ │ │ │ ├── name: nil + │ │ │ │ │ ├── name: ∅ │ │ │ │ │ ├── name_loc: ∅ │ │ │ │ │ └── operator_loc: (17,10)-(17,11) = "*" │ │ │ │ ├── posts: (length: 0) @@ -497,7 +497,7 @@ │ │ │ │ ├── optionals: (length: 0) │ │ │ │ ├── rest: │ │ │ │ │ @ RestParameterNode (location: (32,11)-(32,12)) - │ │ │ │ │ ├── name: nil + │ │ │ │ │ ├── name: ∅ │ │ │ │ │ ├── name_loc: ∅ │ │ │ │ │ └── operator_loc: (32,11)-(32,12) = "*" │ │ │ │ ├── posts: (length: 0) diff --git a/test/prism/snapshots/unparser/corpus/literal/def.txt b/test/prism/snapshots/unparser/corpus/literal/def.txt index d59d0e21a5..0e283e8fe2 100644 --- a/test/prism/snapshots/unparser/corpus/literal/def.txt +++ b/test/prism/snapshots/unparser/corpus/literal/def.txt @@ -725,7 +725,7 @@ │ │ ├── optionals: (length: 0) │ │ ├── rest: │ │ │ @ RestParameterNode (location: (83,8)-(83,9)) - │ │ │ ├── name: nil + │ │ │ ├── name: ∅ │ │ │ ├── name_loc: ∅ │ │ │ └── operator_loc: (83,8)-(83,9) = "*" │ │ ├── posts: (length: 0) @@ -1137,13 +1137,13 @@ │ │ │ │ ├── opening_loc: (128,4)-(128,6) = "\#{" │ │ │ │ ├── statements: ∅ │ │ │ │ └── closing_loc: (128,6)-(128,7) = "}" - │ │ │ └── @ StringNode (location: (128,7)-(128,0)) + │ │ │ └── @ StringNode (location: (128,7)-(129,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (128,7)-(128,0) = "\n" + │ │ │ ├── content_loc: (128,7)-(129,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── closing_loc: (129,0)-(129,0) = " HEREDOC\n" + │ │ └── closing_loc: (129,0)-(130,0) = " HEREDOC\n" │ ├── locals: [] │ ├── def_keyword_loc: (126,0)-(126,3) = "def" │ ├── operator_loc: ∅ diff --git a/test/prism/snapshots/unparser/corpus/literal/dstr.txt b/test/prism/snapshots/unparser/corpus/literal/dstr.txt index 7b9adde364..9f3cbbb0ac 100644 --- a/test/prism/snapshots/unparser/corpus/literal/dstr.txt +++ b/test/prism/snapshots/unparser/corpus/literal/dstr.txt @@ -36,23 +36,23 @@ │ │ ├── @ InterpolatedStringNode (location: (5,2)-(5,12)) │ │ │ ├── opening_loc: (5,2)-(5,12) = "<<-HEREDOC" │ │ │ ├── parts: (length: 3) - │ │ │ │ ├── @ StringNode (location: (6,0)-(6,0)) + │ │ │ │ ├── @ StringNode (location: (6,0)-(7,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (6,0)-(6,0) = "a\n" + │ │ │ │ │ ├── content_loc: (6,0)-(7,0) = "a\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "a\n" │ │ │ │ ├── @ EmbeddedStatementsNode (location: (7,0)-(7,3)) │ │ │ │ │ ├── opening_loc: (7,0)-(7,2) = "\#{" │ │ │ │ │ ├── statements: ∅ │ │ │ │ │ └── closing_loc: (7,2)-(7,3) = "}" - │ │ │ │ └── @ StringNode (location: (7,3)-(8,0)) + │ │ │ │ └── @ StringNode (location: (7,3)-(9,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (7,3)-(8,0) = "a\nb\n" + │ │ │ │ ├── content_loc: (7,3)-(9,0) = "a\nb\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "a\nb\n" - │ │ │ └── closing_loc: (9,0)-(9,0) = " HEREDOC\n" + │ │ │ └── closing_loc: (9,0)-(10,0) = " HEREDOC\n" │ │ └── @ CallNode (location: (10,2)-(10,3)) │ │ ├── receiver: ∅ │ │ ├── call_operator_loc: ∅ @@ -68,43 +68,43 @@ ├── @ InterpolatedStringNode (location: (12,0)-(12,10)) │ ├── opening_loc: (12,0)-(12,10) = "<<-HEREDOC" │ ├── parts: (length: 7) - │ │ ├── @ StringNode (location: (13,0)-(13,0)) + │ │ ├── @ StringNode (location: (13,0)-(14,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (13,0)-(13,0) = "\\\#{}\\\#{}\n" + │ │ │ ├── content_loc: (13,0)-(14,0) = "\\\#{}\\\#{}\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\#{}\#{}\n" │ │ ├── @ EmbeddedStatementsNode (location: (14,0)-(14,3)) │ │ │ ├── opening_loc: (14,0)-(14,2) = "\#{" │ │ │ ├── statements: ∅ │ │ │ └── closing_loc: (14,2)-(14,3) = "}" - │ │ ├── @ StringNode (location: (14,3)-(14,0)) + │ │ ├── @ StringNode (location: (14,3)-(15,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (14,3)-(14,0) = "\n" + │ │ │ ├── content_loc: (14,3)-(15,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" │ │ ├── @ EmbeddedStatementsNode (location: (15,0)-(15,3)) │ │ │ ├── opening_loc: (15,0)-(15,2) = "\#{" │ │ │ ├── statements: ∅ │ │ │ └── closing_loc: (15,2)-(15,3) = "}" - │ │ ├── @ StringNode (location: (15,3)-(15,0)) + │ │ ├── @ StringNode (location: (15,3)-(16,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (15,3)-(15,0) = "\n" + │ │ │ ├── content_loc: (15,3)-(16,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" │ │ ├── @ EmbeddedStatementsNode (location: (16,0)-(16,3)) │ │ │ ├── opening_loc: (16,0)-(16,2) = "\#{" │ │ │ ├── statements: ∅ │ │ │ └── closing_loc: (16,2)-(16,3) = "}" - │ │ └── @ StringNode (location: (16,3)-(16,0)) + │ │ └── @ StringNode (location: (16,3)-(17,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (16,3)-(16,0) = "\n" + │ │ ├── content_loc: (16,3)-(17,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ └── closing_loc: (17,0)-(17,0) = "HEREDOC\n" + │ └── closing_loc: (17,0)-(18,0) = "HEREDOC\n" ├── @ RescueModifierNode (location: (18,0)-(18,21)) │ ├── expression: │ │ @ InterpolatedStringNode (location: (18,0)-(18,10)) @@ -114,13 +114,13 @@ │ │ │ │ ├── opening_loc: (19,0)-(19,2) = "\#{" │ │ │ │ ├── statements: ∅ │ │ │ │ └── closing_loc: (19,2)-(19,3) = "}" - │ │ │ └── @ StringNode (location: (19,3)-(20,0)) + │ │ │ └── @ StringNode (location: (19,3)-(21,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (19,3)-(20,0) = "\na\n" + │ │ │ ├── content_loc: (19,3)-(21,0) = "\na\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\na\n" - │ │ └── closing_loc: (21,0)-(21,0) = "HEREDOC\n" + │ │ └── closing_loc: (21,0)-(22,0) = "HEREDOC\n" │ ├── keyword_loc: (18,11)-(18,17) = "rescue" │ └── rescue_expression: │ @ NilNode (location: (18,18)-(18,21)) @@ -213,13 +213,13 @@ │ │ │ │ │ │ └── @ IntegerNode (location: (28,6)-(28,8)) │ │ │ │ │ │ └── flags: decimal │ │ │ │ │ └── closing_loc: (28,8)-(28,9) = "}" - │ │ │ │ └── @ StringNode (location: (28,9)-(28,0)) + │ │ │ │ └── @ StringNode (location: (28,9)-(29,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (28,9)-(28,0) = "\n" + │ │ │ │ ├── content_loc: (28,9)-(29,0) = "\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "\n" - │ │ │ └── closing_loc: (29,0)-(29,0) = " HEREDOC\n" + │ │ │ └── closing_loc: (29,0)-(30,0) = " HEREDOC\n" │ │ └── flags: ∅ │ ├── consequent: ∅ │ └── end_keyword_loc: (30,0)-(30,3) = "end" @@ -256,13 +256,13 @@ │ │ │ │ │ │ ├── flags: variable_call │ │ │ │ │ │ └── name: :bar │ │ │ │ │ └── closing_loc: (32,7)-(32,8) = "}" - │ │ │ │ └── @ StringNode (location: (32,8)-(32,0)) + │ │ │ │ └── @ StringNode (location: (32,8)-(33,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (32,8)-(32,0) = "\n" + │ │ │ │ ├── content_loc: (32,8)-(33,0) = "\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "\n" - │ │ │ └── closing_loc: (33,0)-(33,0) = "HEREDOC\n" + │ │ │ └── closing_loc: (33,0)-(34,0) = "HEREDOC\n" │ │ └── flags: ∅ │ ├── closing_loc: (31,14)-(31,15) = ")" │ ├── block: ∅ @@ -301,13 +301,13 @@ │ │ │ │ │ ├── flags: variable_call │ │ │ │ │ └── name: :bar │ │ │ │ └── closing_loc: (35,7)-(35,8) = "}" - │ │ │ └── @ StringNode (location: (35,8)-(35,0)) + │ │ │ └── @ StringNode (location: (35,8)-(36,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (35,8)-(35,0) = "\n" + │ │ │ ├── content_loc: (35,8)-(36,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── closing_loc: (36,0)-(36,0) = "HEREDOC\n" + │ │ └── closing_loc: (36,0)-(37,0) = "HEREDOC\n" │ └── flags: ∅ ├── closing_loc: (34,14)-(34,15) = ")" ├── block: diff --git a/test/prism/snapshots/unparser/corpus/literal/empty.txt b/test/prism/snapshots/unparser/corpus/literal/empty.txt index 870bdb6ad5..3a21ce5559 100644 --- a/test/prism/snapshots/unparser/corpus/literal/empty.txt +++ b/test/prism/snapshots/unparser/corpus/literal/empty.txt @@ -1,5 +1,5 @@ -@ ProgramNode (location: (1,0)-(0,0)) +@ ProgramNode (location: (1,0)-(1,0)) ├── locals: [] └── statements: - @ StatementsNode (location: (1,0)-(0,0)) + @ StatementsNode (location: (1,0)-(1,0)) └── body: (length: 0) diff --git a/test/prism/snapshots/unparser/corpus/literal/literal.txt b/test/prism/snapshots/unparser/corpus/literal/literal.txt index c597bc9e93..abf552b518 100644 --- a/test/prism/snapshots/unparser/corpus/literal/literal.txt +++ b/test/prism/snapshots/unparser/corpus/literal/literal.txt @@ -28,13 +28,13 @@ │ │ │ │ │ │ ├── opening_loc: (2,2)-(2,4) = "\#{" │ │ │ │ │ │ ├── statements: ∅ │ │ │ │ │ │ └── closing_loc: (2,4)-(2,5) = "}" - │ │ │ │ │ └── @ StringNode (location: (2,5)-(2,0)) + │ │ │ │ │ └── @ StringNode (location: (2,5)-(3,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (2,5)-(2,0) = "\n" + │ │ │ │ │ ├── content_loc: (2,5)-(3,0) = "\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "\n" - │ │ │ │ └── closing_loc: (3,0)-(3,0) = "HEREDOC\n" + │ │ │ │ └── closing_loc: (3,0)-(4,0) = "HEREDOC\n" │ │ │ └── operator_loc: (1,8)-(1,10) = "=>" │ │ └── @ AssocNode (location: (1,23)-(1,36)) │ │ ├── key: @@ -126,13 +126,13 @@ │ │ │ │ │ │ ├── opening_loc: (7,2)-(7,4) = "\#{" │ │ │ │ │ │ ├── statements: ∅ │ │ │ │ │ │ └── closing_loc: (7,4)-(7,5) = "}" - │ │ │ │ │ └── @ StringNode (location: (7,5)-(7,0)) + │ │ │ │ │ └── @ StringNode (location: (7,5)-(8,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (7,5)-(7,0) = "\n" + │ │ │ │ │ ├── content_loc: (7,5)-(8,0) = "\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "\n" - │ │ │ │ └── closing_loc: (8,0)-(8,0) = "HEREDOC\n" + │ │ │ │ └── closing_loc: (8,0)-(9,0) = "HEREDOC\n" │ │ │ └── flags: ∅ │ │ ├── closing_loc: (6,12)-(6,13) = ")" │ │ ├── block: ∅ @@ -200,13 +200,13 @@ │ │ │ │ │ │ ├── opening_loc: (11,2)-(11,4) = "\#{" │ │ │ │ │ │ ├── statements: ∅ │ │ │ │ │ │ └── closing_loc: (11,4)-(11,5) = "}" - │ │ │ │ │ └── @ StringNode (location: (11,5)-(11,0)) + │ │ │ │ │ └── @ StringNode (location: (11,5)-(12,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (11,5)-(11,0) = "\n" + │ │ │ │ │ ├── content_loc: (11,5)-(12,0) = "\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "\n" - │ │ │ │ └── closing_loc: (12,0)-(12,0) = "HEREDOC\n" + │ │ │ │ └── closing_loc: (12,0)-(13,0) = "HEREDOC\n" │ │ │ └── operator_loc: (10,8)-(10,10) = "=>" │ │ └── @ AssocSplatNode (location: (10,23)-(10,28)) │ │ ├── value: @@ -534,7 +534,7 @@ │ └── unescaped: "A\"B" ├── @ SymbolNode (location: (48,0)-(48,3)) │ ├── opening_loc: (48,0)-(48,2) = ":\"" - │ ├── value_loc: (1,0)-(0,0) = "" + │ ├── value_loc: (1,0)-(1,0) = "" │ ├── closing_loc: (48,2)-(48,3) = "\"" │ └── unescaped: "" ├── @ RegularExpressionNode (location: (49,0)-(49,5)) @@ -1015,10 +1015,10 @@ │ │ │ ├── opening_loc: (81,1)-(81,3) = "\#{" │ │ │ ├── statements: ∅ │ │ │ └── closing_loc: (81,3)-(81,4) = "}" - │ │ ├── @ StringNode (location: (81,4)-(81,0)) + │ │ ├── @ StringNode (location: (81,4)-(82,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (81,4)-(81,0) = "\n" + │ │ │ ├── content_loc: (81,4)-(82,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" │ │ ├── @ EmbeddedStatementsNode (location: (82,0)-(82,3)) @@ -1053,10 +1053,10 @@ │ │ │ │ │ ├── opening_loc: (84,3)-(84,5) = "\#{" │ │ │ │ │ ├── statements: ∅ │ │ │ │ │ └── closing_loc: (84,5)-(84,6) = "}" - │ │ │ │ ├── @ StringNode (location: (84,6)-(84,0)) + │ │ │ │ ├── @ StringNode (location: (84,6)-(85,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (84,6)-(84,0) = "\n" + │ │ │ │ │ ├── content_loc: (84,6)-(85,0) = "\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "\n" │ │ │ │ ├── @ EmbeddedStatementsNode (location: (85,0)-(85,3)) @@ -1082,10 +1082,10 @@ └── @ InterpolatedXStringNode (location: (89,0)-(91,2)) ├── opening_loc: (89,0)-(89,1) = "`" ├── parts: (length: 3) - │ ├── @ StringNode (location: (89,1)-(89,0)) + │ ├── @ StringNode (location: (89,1)-(90,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (89,1)-(89,0) = " x\n" + │ │ ├── content_loc: (89,1)-(90,0) = " x\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: " x\n" │ ├── @ EmbeddedStatementsNode (location: (90,0)-(90,6)) diff --git a/test/prism/snapshots/unparser/corpus/literal/since/31.txt b/test/prism/snapshots/unparser/corpus/literal/since/31.txt index 59a2579952..87d3fb8bf8 100644 --- a/test/prism/snapshots/unparser/corpus/literal/since/31.txt +++ b/test/prism/snapshots/unparser/corpus/literal/since/31.txt @@ -17,7 +17,7 @@ │ │ ├── keyword_rest: ∅ │ │ └── block: │ │ @ BlockParameterNode (location: (1,8)-(1,9)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (1,8)-(1,9) = "&" │ ├── body: @@ -59,7 +59,7 @@ │ ├── keyword_rest: ∅ │ └── block: │ @ BlockParameterNode (location: (5,11)-(5,12)) - │ ├── name: nil + │ ├── name: ∅ │ ├── name_loc: ∅ │ └── operator_loc: (5,11)-(5,12) = "&" ├── body: diff --git a/test/prism/snapshots/unparser/corpus/literal/since/32.txt b/test/prism/snapshots/unparser/corpus/literal/since/32.txt index d58bf60309..4db42e5de1 100644 --- a/test/prism/snapshots/unparser/corpus/literal/since/32.txt +++ b/test/prism/snapshots/unparser/corpus/literal/since/32.txt @@ -18,7 +18,7 @@ │ │ ├── keywords: (length: 0) │ │ ├── keyword_rest: │ │ │ @ KeywordRestParameterNode (location: (1,18)-(1,20)) - │ │ │ ├── name: nil + │ │ │ ├── name: ∅ │ │ │ ├── name_loc: ∅ │ │ │ └── operator_loc: (1,18)-(1,20) = "**" │ │ └── block: ∅ @@ -65,7 +65,7 @@ │ ├── optionals: (length: 0) │ ├── rest: │ │ @ RestParameterNode (location: (5,18)-(5,19)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (5,18)-(5,19) = "*" │ ├── posts: (length: 0) diff --git a/test/prism/snapshots/unparser/corpus/semantic/block.txt b/test/prism/snapshots/unparser/corpus/semantic/block.txt index fc29ac10e6..e525e3d5ad 100644 --- a/test/prism/snapshots/unparser/corpus/semantic/block.txt +++ b/test/prism/snapshots/unparser/corpus/semantic/block.txt @@ -116,8 +116,8 @@ │ │ │ └── @ StringNode (location: (16,4)-(16,10)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (16,4)-(16,10) = "<<-DOC" - │ │ │ ├── content_loc: (17,0)-(17,0) = " b\n" - │ │ │ ├── closing_loc: (18,0)-(18,0) = "DOC\n" + │ │ │ ├── content_loc: (17,0)-(18,0) = " b\n" + │ │ │ ├── closing_loc: (18,0)-(19,0) = "DOC\n" │ │ │ └── unescaped: " b\n" │ │ └── flags: ∅ │ ├── closing_loc: (16,10)-(16,11) = ")" @@ -161,8 +161,8 @@ │ │ └── @ StringNode (location: (22,4)-(22,10)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (22,4)-(22,10) = "<<-DOC" - │ │ ├── content_loc: (23,0)-(23,0) = " b\n" - │ │ ├── closing_loc: (24,0)-(24,0) = "DOC\n" + │ │ ├── content_loc: (23,0)-(24,0) = " b\n" + │ │ ├── closing_loc: (24,0)-(25,0) = "DOC\n" │ │ └── unescaped: " b\n" │ └── flags: ∅ ├── closing_loc: (22,10)-(22,11) = ")" diff --git a/test/prism/snapshots/unparser/corpus/semantic/dstr.txt b/test/prism/snapshots/unparser/corpus/semantic/dstr.txt index f52663c5a1..75b60e5288 100644 --- a/test/prism/snapshots/unparser/corpus/semantic/dstr.txt +++ b/test/prism/snapshots/unparser/corpus/semantic/dstr.txt @@ -6,38 +6,38 @@ ├── @ StringNode (location: (1,0)-(1,5)) │ ├── flags: ∅ │ ├── opening_loc: (1,0)-(1,5) = "<<DOC" - │ ├── content_loc: (2,0)-(1,0) = "" - │ ├── closing_loc: (2,0)-(2,0) = "DOC\n" + │ ├── content_loc: (2,0)-(2,0) = "" + │ ├── closing_loc: (2,0)-(3,0) = "DOC\n" │ └── unescaped: "" ├── @ StringNode (location: (4,0)-(4,7)) │ ├── flags: ∅ │ ├── opening_loc: (4,0)-(4,7) = "<<'DOC'" - │ ├── content_loc: (5,0)-(4,0) = "" - │ ├── closing_loc: (5,0)-(5,0) = "DOC\n" + │ ├── content_loc: (5,0)-(5,0) = "" + │ ├── closing_loc: (5,0)-(6,0) = "DOC\n" │ └── unescaped: "" ├── @ StringNode (location: (7,0)-(7,6)) │ ├── flags: ∅ │ ├── opening_loc: (7,0)-(7,6) = "<<~DOC" - │ ├── content_loc: (8,0)-(7,0) = "" - │ ├── closing_loc: (8,0)-(8,0) = "DOC\n" + │ ├── content_loc: (8,0)-(8,0) = "" + │ ├── closing_loc: (8,0)-(9,0) = "DOC\n" │ └── unescaped: "" ├── @ StringNode (location: (10,0)-(10,8)) │ ├── flags: ∅ │ ├── opening_loc: (10,0)-(10,8) = "<<~'DOC'" - │ ├── content_loc: (11,0)-(10,0) = "" - │ ├── closing_loc: (11,0)-(11,0) = "DOC\n" + │ ├── content_loc: (11,0)-(11,0) = "" + │ ├── closing_loc: (11,0)-(12,0) = "DOC\n" │ └── unescaped: "" ├── @ StringNode (location: (13,0)-(13,5)) │ ├── flags: ∅ │ ├── opening_loc: (13,0)-(13,5) = "<<DOC" - │ ├── content_loc: (14,0)-(14,0) = " a\n" - │ ├── closing_loc: (15,0)-(15,0) = "DOC\n" + │ ├── content_loc: (14,0)-(15,0) = " a\n" + │ ├── closing_loc: (15,0)-(16,0) = "DOC\n" │ └── unescaped: " a\n" ├── @ StringNode (location: (17,0)-(17,7)) │ ├── flags: ∅ │ ├── opening_loc: (17,0)-(17,7) = "<<'DOC'" - │ ├── content_loc: (18,0)-(18,0) = " a\n" - │ ├── closing_loc: (19,0)-(19,0) = "DOC\n" + │ ├── content_loc: (18,0)-(19,0) = " a\n" + │ ├── closing_loc: (19,0)-(20,0) = "DOC\n" │ └── unescaped: " a\n" ├── @ InterpolatedStringNode (location: (21,0)-(21,5)) │ ├── opening_loc: (21,0)-(21,5) = "<<DOC" @@ -52,92 +52,92 @@ │ │ │ ├── opening_loc: (23,2)-(23,4) = "\#{" │ │ │ ├── statements: ∅ │ │ │ └── closing_loc: (23,4)-(23,5) = "}" - │ │ └── @ StringNode (location: (23,5)-(23,0)) + │ │ └── @ StringNode (location: (23,5)-(24,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (23,5)-(23,0) = "\n" + │ │ ├── content_loc: (23,5)-(24,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ └── closing_loc: (24,0)-(24,0) = "DOC\n" + │ └── closing_loc: (24,0)-(25,0) = "DOC\n" ├── @ InterpolatedStringNode (location: (26,0)-(26,6)) │ ├── opening_loc: (26,0)-(26,6) = "<<~DOC" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (27,0)-(27,0)) + │ │ ├── @ StringNode (location: (27,0)-(28,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (27,0)-(27,0) = " a\n" + │ │ │ ├── content_loc: (27,0)-(28,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" │ │ ├── @ EmbeddedStatementsNode (location: (28,2)-(28,5)) │ │ │ ├── opening_loc: (28,2)-(28,4) = "\#{" │ │ │ ├── statements: ∅ │ │ │ └── closing_loc: (28,4)-(28,5) = "}" - │ │ └── @ StringNode (location: (28,5)-(28,0)) + │ │ └── @ StringNode (location: (28,5)-(29,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (28,5)-(28,0) = "\n" + │ │ ├── content_loc: (28,5)-(29,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ └── closing_loc: (29,0)-(29,0) = "DOC\n" + │ └── closing_loc: (29,0)-(30,0) = "DOC\n" ├── @ InterpolatedStringNode (location: (31,0)-(31,6)) │ ├── opening_loc: (31,0)-(31,6) = "<<~DOC" │ ├── parts: (length: 4) - │ │ ├── @ StringNode (location: (32,0)-(32,0)) + │ │ ├── @ StringNode (location: (32,0)-(33,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (32,0)-(32,0) = " a\n" + │ │ │ ├── content_loc: (32,0)-(33,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" │ │ ├── @ EmbeddedStatementsNode (location: (33,2)-(33,5)) │ │ │ ├── opening_loc: (33,2)-(33,4) = "\#{" │ │ │ ├── statements: ∅ │ │ │ └── closing_loc: (33,4)-(33,5) = "}" - │ │ ├── @ StringNode (location: (33,5)-(33,0)) + │ │ ├── @ StringNode (location: (33,5)-(34,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (33,5)-(33,0) = "\n" + │ │ │ ├── content_loc: (33,5)-(34,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── @ StringNode (location: (34,0)-(34,0)) + │ │ └── @ StringNode (location: (34,0)-(35,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (34,0)-(34,0) = " b\n" + │ │ ├── content_loc: (34,0)-(35,0) = " b\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b\n" - │ └── closing_loc: (35,0)-(35,0) = "DOC\n" + │ └── closing_loc: (35,0)-(36,0) = "DOC\n" ├── @ InterpolatedStringNode (location: (37,0)-(37,6)) │ ├── opening_loc: (37,0)-(37,6) = "<<~DOC" │ ├── parts: (length: 2) - │ │ ├── @ StringNode (location: (38,0)-(38,0)) + │ │ ├── @ StringNode (location: (38,0)-(39,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (38,0)-(38,0) = " a\n" + │ │ │ ├── content_loc: (38,0)-(39,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" - │ │ └── @ StringNode (location: (39,0)-(39,0)) + │ │ └── @ StringNode (location: (39,0)-(40,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (39,0)-(39,0) = " b\n" + │ │ ├── content_loc: (39,0)-(40,0) = " b\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: " b\n" - │ └── closing_loc: (40,0)-(40,0) = "DOC\n" + │ └── closing_loc: (40,0)-(41,0) = "DOC\n" ├── @ StringNode (location: (42,0)-(42,7)) │ ├── flags: ∅ │ ├── opening_loc: (42,0)-(42,7) = "<<'DOC'" - │ ├── content_loc: (43,0)-(45,0) = "a\n\nb\n" - │ ├── closing_loc: (46,0)-(46,0) = "DOC\n" + │ ├── content_loc: (43,0)-(46,0) = "a\n\nb\n" + │ ├── closing_loc: (46,0)-(47,0) = "DOC\n" │ └── unescaped: "a\n\nb\n" ├── @ StringNode (location: (48,0)-(48,7)) │ ├── flags: ∅ │ ├── opening_loc: (48,0)-(48,7) = "<<'DOC'" - │ ├── content_loc: (49,0)-(51,0) = " a\n\n b\n" - │ ├── closing_loc: (52,0)-(52,0) = "DOC\n" + │ ├── content_loc: (49,0)-(52,0) = " a\n\n b\n" + │ ├── closing_loc: (52,0)-(53,0) = "DOC\n" │ └── unescaped: " a\n\n b\n" ├── @ StringNode (location: (54,0)-(54,7)) │ ├── flags: ∅ │ ├── opening_loc: (54,0)-(54,7) = "<<'DOC'" - │ ├── content_loc: (55,0)-(55,0) = " a\\nb\n" - │ ├── closing_loc: (56,0)-(56,0) = "DOC\n" + │ ├── content_loc: (55,0)-(56,0) = " a\\nb\n" + │ ├── closing_loc: (56,0)-(57,0) = "DOC\n" │ └── unescaped: " a\\nb\n" ├── @ InterpolatedStringNode (location: (58,0)-(58,5)) │ ├── opening_loc: (58,0)-(58,5) = "<<DOC" @@ -156,13 +156,13 @@ │ │ │ ├── opening_loc: (60,1)-(60,3) = "\#{" │ │ │ ├── statements: ∅ │ │ │ └── closing_loc: (60,3)-(60,4) = "}" - │ │ └── @ StringNode (location: (60,4)-(60,0)) + │ │ └── @ StringNode (location: (60,4)-(61,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (60,4)-(60,0) = "a\n" + │ │ ├── content_loc: (60,4)-(61,0) = "a\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "a\n" - │ └── closing_loc: (61,0)-(61,0) = "DOC\n" + │ └── closing_loc: (61,0)-(62,0) = "DOC\n" ├── @ InterpolatedStringNode (location: (63,0)-(63,5)) │ ├── opening_loc: (63,0)-(63,5) = "<<DOC" │ ├── parts: (length: 3) @@ -176,13 +176,13 @@ │ │ │ ├── opening_loc: (64,2)-(64,4) = "\#{" │ │ │ ├── statements: ∅ │ │ │ └── closing_loc: (64,4)-(64,5) = "}" - │ │ └── @ StringNode (location: (64,5)-(65,0)) + │ │ └── @ StringNode (location: (64,5)-(66,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (64,5)-(65,0) = "\n \\\#{}\n" + │ │ ├── content_loc: (64,5)-(66,0) = "\n \\\#{}\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n \#{}\n" - │ └── closing_loc: (66,0)-(66,0) = "DOC\n" + │ └── closing_loc: (66,0)-(67,0) = "DOC\n" ├── @ InterpolatedStringNode (location: (68,0)-(68,5)) │ ├── opening_loc: (68,0)-(68,5) = "<<DOC" │ ├── parts: (length: 3) @@ -196,13 +196,13 @@ │ │ │ ├── opening_loc: (69,2)-(69,4) = "\#{" │ │ │ ├── statements: ∅ │ │ │ └── closing_loc: (69,4)-(69,5) = "}" - │ │ └── @ StringNode (location: (69,5)-(70,0)) + │ │ └── @ StringNode (location: (69,5)-(71,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (69,5)-(70,0) = "b\n c\n" + │ │ ├── content_loc: (69,5)-(71,0) = "b\n c\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "b\n c\n" - │ └── closing_loc: (71,0)-(71,0) = "DOC\n" + │ └── closing_loc: (71,0)-(72,0) = "DOC\n" ├── @ InterpolatedStringNode (location: (73,0)-(73,6)) │ ├── opening_loc: (73,0)-(73,6) = "<<~DOC" │ ├── parts: (length: 2) @@ -210,13 +210,13 @@ │ │ │ ├── opening_loc: (74,2)-(74,4) = "\#{" │ │ │ ├── statements: ∅ │ │ │ └── closing_loc: (74,4)-(74,5) = "}" - │ │ └── @ StringNode (location: (74,5)-(74,0)) + │ │ └── @ StringNode (location: (74,5)-(75,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (74,5)-(74,0) = "\n" + │ │ ├── content_loc: (74,5)-(75,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" - │ └── closing_loc: (75,0)-(75,0) = "DOC\n" + │ └── closing_loc: (75,0)-(76,0) = "DOC\n" ├── @ IfNode (location: (77,0)-(81,3)) │ ├── if_keyword_loc: (77,0)-(77,2) = "if" │ ├── predicate: @@ -231,13 +231,13 @@ │ │ │ │ ├── opening_loc: (79,4)-(79,6) = "\#{" │ │ │ │ ├── statements: ∅ │ │ │ │ └── closing_loc: (79,6)-(79,7) = "}" - │ │ │ └── @ StringNode (location: (79,7)-(79,0)) + │ │ │ └── @ StringNode (location: (79,7)-(80,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (79,7)-(79,0) = "\n" + │ │ │ ├── content_loc: (79,7)-(80,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── closing_loc: (80,0)-(80,0) = " DOC\n" + │ │ └── closing_loc: (80,0)-(81,0) = " DOC\n" │ ├── consequent: ∅ │ └── end_keyword_loc: (81,0)-(81,3) = "end" ├── @ IfNode (location: (83,0)-(87,3)) @@ -260,13 +260,13 @@ │ │ │ │ ├── opening_loc: (85,5)-(85,7) = "\#{" │ │ │ │ ├── statements: ∅ │ │ │ │ └── closing_loc: (85,7)-(85,8) = "}" - │ │ │ └── @ StringNode (location: (85,8)-(85,0)) + │ │ │ └── @ StringNode (location: (85,8)-(86,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (85,8)-(85,0) = "\n" + │ │ │ ├── content_loc: (85,8)-(86,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── closing_loc: (86,0)-(86,0) = " DOC\n" + │ │ └── closing_loc: (86,0)-(87,0) = " DOC\n" │ ├── consequent: ∅ │ └── end_keyword_loc: (87,0)-(87,3) = "end" ├── @ IfNode (location: (89,0)-(93,3)) @@ -283,13 +283,13 @@ │ │ │ │ ├── opening_loc: (91,4)-(91,6) = "\#{" │ │ │ │ ├── statements: ∅ │ │ │ │ └── closing_loc: (91,6)-(91,7) = "}" - │ │ │ └── @ StringNode (location: (91,7)-(91,0)) + │ │ │ └── @ StringNode (location: (91,7)-(92,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (91,7)-(91,0) = "a\n" + │ │ │ ├── content_loc: (91,7)-(92,0) = "a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" - │ │ └── closing_loc: (92,0)-(92,0) = " DOC\n" + │ │ └── closing_loc: (92,0)-(93,0) = " DOC\n" │ ├── consequent: ∅ │ └── end_keyword_loc: (93,0)-(93,3) = "end" ├── @ IfNode (location: (95,0)-(101,3)) @@ -302,8 +302,8 @@ │ │ └── @ StringNode (location: (96,2)-(96,10)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (96,2)-(96,10) = "<<-'DOC'" - │ │ ├── content_loc: (97,0)-(99,0) = " a\n\n b\n" - │ │ ├── closing_loc: (100,0)-(100,0) = " DOC\n" + │ │ ├── content_loc: (97,0)-(100,0) = " a\n\n b\n" + │ │ ├── closing_loc: (100,0)-(101,0) = " DOC\n" │ │ └── unescaped: " a\n\n b\n" │ ├── consequent: ∅ │ └── end_keyword_loc: (101,0)-(101,3) = "end" @@ -364,10 +364,10 @@ ├── @ InterpolatedStringNode (location: (109,0)-(111,2)) │ ├── opening_loc: (109,0)-(109,1) = "\"" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (109,1)-(109,0)) + │ │ ├── @ StringNode (location: (109,1)-(110,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (109,1)-(109,0) = "a\n" + │ │ │ ├── content_loc: (109,1)-(110,0) = "a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" │ │ ├── @ EmbeddedStatementsNode (location: (110,0)-(110,3)) @@ -404,10 +404,10 @@ ├── @ InterpolatedStringNode (location: (116,0)-(117,7)) │ ├── opening_loc: (116,0)-(116,1) = "\"" │ ├── parts: (length: 3) - │ │ ├── @ StringNode (location: (116,1)-(116,0)) + │ │ ├── @ StringNode (location: (116,1)-(117,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (116,1)-(116,0) = "a\n" + │ │ │ ├── content_loc: (116,1)-(117,0) = "a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "a\n" │ │ ├── @ EmbeddedStatementsNode (location: (117,0)-(117,3)) diff --git a/test/prism/snapshots/unparser/corpus/semantic/while.txt b/test/prism/snapshots/unparser/corpus/semantic/while.txt index ef08198e37..859c21386e 100644 --- a/test/prism/snapshots/unparser/corpus/semantic/while.txt +++ b/test/prism/snapshots/unparser/corpus/semantic/while.txt @@ -188,8 +188,8 @@ │ │ │ │ └── @ StringNode (location: (15,10)-(15,16)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (15,10)-(15,16) = "<<-FOO" - │ │ │ │ ├── content_loc: (16,0)-(15,0) = "" - │ │ │ │ ├── closing_loc: (16,0)-(16,0) = "FOO\n" + │ │ │ │ ├── content_loc: (16,0)-(16,0) = "" + │ │ │ │ ├── closing_loc: (16,0)-(17,0) = "FOO\n" │ │ │ │ └── unescaped: "" │ │ │ └── flags: ∅ │ │ ├── closing_loc: (15,16)-(15,17) = ")" diff --git a/test/prism/snapshots/whitequark/anonymous_blockarg.txt b/test/prism/snapshots/whitequark/anonymous_blockarg.txt index 2b03263a50..65d9d645e8 100644 --- a/test/prism/snapshots/whitequark/anonymous_blockarg.txt +++ b/test/prism/snapshots/whitequark/anonymous_blockarg.txt @@ -17,7 +17,7 @@ │ ├── keyword_rest: ∅ │ └── block: │ @ BlockParameterNode (location: (1,8)-(1,9)) - │ ├── name: nil + │ ├── name: ∅ │ ├── name_loc: ∅ │ └── operator_loc: (1,8)-(1,9) = "&" ├── body: diff --git a/test/prism/snapshots/whitequark/args.txt b/test/prism/snapshots/whitequark/args.txt index 3e20260009..1568396d9a 100644 --- a/test/prism/snapshots/whitequark/args.txt +++ b/test/prism/snapshots/whitequark/args.txt @@ -469,14 +469,14 @@ │ │ ├── optionals: (length: 0) │ │ ├── rest: │ │ │ @ RestParameterNode (location: (29,6)-(29,7)) - │ │ │ ├── name: nil + │ │ │ ├── name: ∅ │ │ │ ├── name_loc: ∅ │ │ │ └── operator_loc: (29,6)-(29,7) = "*" │ │ ├── posts: (length: 0) │ │ ├── keywords: (length: 0) │ │ ├── keyword_rest: │ │ │ @ KeywordRestParameterNode (location: (29,9)-(29,11)) - │ │ │ ├── name: nil + │ │ │ ├── name: ∅ │ │ │ ├── name_loc: ∅ │ │ │ └── operator_loc: (29,9)-(29,11) = "**" │ │ └── block: ∅ diff --git a/test/prism/snapshots/whitequark/blockargs.txt b/test/prism/snapshots/whitequark/blockargs.txt index a6ce114266..39ef3adfd6 100644 --- a/test/prism/snapshots/whitequark/blockargs.txt +++ b/test/prism/snapshots/whitequark/blockargs.txt @@ -128,7 +128,7 @@ │ │ │ │ ├── optionals: (length: 0) │ │ │ │ ├── rest: │ │ │ │ │ @ RestParameterNode (location: (9,4)-(9,5)) - │ │ │ │ │ ├── name: nil + │ │ │ │ │ ├── name: ∅ │ │ │ │ │ ├── name_loc: ∅ │ │ │ │ │ └── operator_loc: (9,4)-(9,5) = "*" │ │ │ │ ├── posts: (length: 0) @@ -274,7 +274,7 @@ │ │ │ │ ├── optionals: (length: 0) │ │ │ │ ├── rest: │ │ │ │ │ @ RestParameterNode (location: (17,4)-(17,5)) - │ │ │ │ │ ├── name: nil + │ │ │ │ │ ├── name: ∅ │ │ │ │ │ ├── name_loc: ∅ │ │ │ │ │ └── operator_loc: (17,4)-(17,5) = "*" │ │ │ │ ├── posts: (length: 0) @@ -390,7 +390,7 @@ │ │ │ │ ├── optionals: (length: 0) │ │ │ │ ├── rest: │ │ │ │ │ @ RestParameterNode (location: (27,7)-(27,8)) - │ │ │ │ │ ├── name: nil + │ │ │ │ │ ├── name: ∅ │ │ │ │ │ ├── name_loc: ∅ │ │ │ │ │ └── operator_loc: (27,7)-(27,8) = "*" │ │ │ │ ├── posts: (length: 0) @@ -544,7 +544,7 @@ │ │ │ │ ├── optionals: (length: 0) │ │ │ │ ├── rest: │ │ │ │ │ @ RestParameterNode (location: (35,7)-(35,8)) - │ │ │ │ │ ├── name: nil + │ │ │ │ │ ├── name: ∅ │ │ │ │ │ ├── name_loc: ∅ │ │ │ │ │ └── operator_loc: (35,7)-(35,8) = "*" │ │ │ │ ├── posts: (length: 0) @@ -581,7 +581,7 @@ │ │ │ │ ├── optionals: (length: 0) │ │ │ │ ├── rest: │ │ │ │ │ @ RestParameterNode (location: (37,8)-(37,9)) - │ │ │ │ │ ├── name: nil + │ │ │ │ │ ├── name: ∅ │ │ │ │ │ ├── name_loc: ∅ │ │ │ │ │ └── operator_loc: (37,8)-(37,9) = "," │ │ │ │ ├── posts: (length: 0) @@ -836,7 +836,7 @@ │ │ │ │ ├── optionals: (length: 0) │ │ │ │ ├── rest: │ │ │ │ │ @ RestParameterNode (location: (49,5)-(49,6)) - │ │ │ │ │ ├── name: nil + │ │ │ │ │ ├── name: ∅ │ │ │ │ │ ├── name_loc: ∅ │ │ │ │ │ └── operator_loc: (49,5)-(49,6) = "," │ │ │ │ ├── posts: (length: 0) diff --git a/test/prism/snapshots/whitequark/bug_heredoc_do.txt b/test/prism/snapshots/whitequark/bug_heredoc_do.txt index b291c44506..f62ef2e0d2 100644 --- a/test/prism/snapshots/whitequark/bug_heredoc_do.txt +++ b/test/prism/snapshots/whitequark/bug_heredoc_do.txt @@ -14,8 +14,8 @@ │ │ └── @ StringNode (location: (1,2)-(1,10)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (1,2)-(1,10) = "<<-TABLE" - │ │ ├── content_loc: (2,0)-(1,0) = "" - │ │ ├── closing_loc: (2,0)-(2,0) = "TABLE\n" + │ │ ├── content_loc: (2,0)-(2,0) = "" + │ │ ├── closing_loc: (2,0)-(3,0) = "TABLE\n" │ │ └── unescaped: "" │ └── flags: ∅ ├── closing_loc: ∅ diff --git a/test/prism/snapshots/whitequark/dedenting_heredoc.txt b/test/prism/snapshots/whitequark/dedenting_heredoc.txt index 200581134f..c0ee06c1b5 100644 --- a/test/prism/snapshots/whitequark/dedenting_heredoc.txt +++ b/test/prism/snapshots/whitequark/dedenting_heredoc.txt @@ -14,10 +14,10 @@ │ │ │ └── @ InterpolatedStringNode (location: (1,2)-(1,8)) │ │ │ ├── opening_loc: (1,2)-(1,8) = "<<~\"E\"" │ │ │ ├── parts: (length: 3) - │ │ │ │ ├── @ StringNode (location: (2,0)-(2,0)) + │ │ │ │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (2,0)-(2,0) = " x\n" + │ │ │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: " x\n" │ │ │ │ ├── @ EmbeddedStatementsNode (location: (3,2)-(3,10)) @@ -32,13 +32,13 @@ │ │ │ │ │ │ ├── closing_loc: (3,8)-(3,9) = "\"" │ │ │ │ │ │ └── unescaped: " y" │ │ │ │ │ └── closing_loc: (3,9)-(3,10) = "}" - │ │ │ │ └── @ StringNode (location: (3,10)-(3,0)) + │ │ │ │ └── @ StringNode (location: (3,10)-(4,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (3,10)-(3,0) = "\n" + │ │ │ │ ├── content_loc: (3,10)-(4,0) = "\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "\n" - │ │ │ └── closing_loc: (4,0)-(4,0) = "E\n" + │ │ │ └── closing_loc: (4,0)-(5,0) = "E\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -55,10 +55,10 @@ │ │ │ └── @ InterpolatedStringNode (location: (6,2)-(6,8)) │ │ │ ├── opening_loc: (6,2)-(6,8) = "<<~\"E\"" │ │ │ ├── parts: (length: 3) - │ │ │ │ ├── @ StringNode (location: (7,0)-(7,0)) + │ │ │ │ ├── @ StringNode (location: (7,0)-(8,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (7,0)-(7,0) = " x\n" + │ │ │ │ │ ├── content_loc: (7,0)-(8,0) = " x\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: " x\n" │ │ │ │ ├── @ EmbeddedStatementsNode (location: (8,2)-(8,8)) @@ -77,13 +77,13 @@ │ │ │ │ │ │ ├── flags: variable_call │ │ │ │ │ │ └── name: :foo │ │ │ │ │ └── closing_loc: (8,7)-(8,8) = "}" - │ │ │ │ └── @ StringNode (location: (8,8)-(8,0)) + │ │ │ │ └── @ StringNode (location: (8,8)-(9,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (8,8)-(8,0) = "\n" + │ │ │ │ ├── content_loc: (8,8)-(9,0) = "\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "\n" - │ │ │ └── closing_loc: (9,0)-(9,0) = "E\n" + │ │ │ └── closing_loc: (9,0)-(10,0) = "E\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -100,19 +100,19 @@ │ │ │ └── @ InterpolatedStringNode (location: (11,2)-(11,6)) │ │ │ ├── opening_loc: (11,2)-(11,6) = "<<~E" │ │ │ ├── parts: (length: 2) - │ │ │ │ ├── @ StringNode (location: (12,0)-(12,0)) + │ │ │ │ ├── @ StringNode (location: (12,0)-(13,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (12,0)-(12,0) = "\tx\n" + │ │ │ │ │ ├── content_loc: (12,0)-(13,0) = "\tx\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "x\n" - │ │ │ │ └── @ StringNode (location: (13,0)-(13,0)) + │ │ │ │ └── @ StringNode (location: (13,0)-(14,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (13,0)-(13,0) = " y\n" + │ │ │ │ ├── content_loc: (13,0)-(14,0) = " y\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "y\n" - │ │ │ └── closing_loc: (14,0)-(14,0) = "E\n" + │ │ │ └── closing_loc: (14,0)-(15,0) = "E\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -129,19 +129,19 @@ │ │ │ └── @ InterpolatedStringNode (location: (16,2)-(16,6)) │ │ │ ├── opening_loc: (16,2)-(16,6) = "<<~E" │ │ │ ├── parts: (length: 2) - │ │ │ │ ├── @ StringNode (location: (17,0)-(17,0)) + │ │ │ │ ├── @ StringNode (location: (17,0)-(18,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (17,0)-(17,0) = "\tx\n" + │ │ │ │ │ ├── content_loc: (17,0)-(18,0) = "\tx\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "\tx\n" - │ │ │ │ └── @ StringNode (location: (18,0)-(18,0)) + │ │ │ │ └── @ StringNode (location: (18,0)-(19,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (18,0)-(18,0) = " y\n" + │ │ │ │ ├── content_loc: (18,0)-(19,0) = " y\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "y\n" - │ │ │ └── closing_loc: (19,0)-(19,0) = "E\n" + │ │ │ └── closing_loc: (19,0)-(20,0) = "E\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -158,19 +158,19 @@ │ │ │ └── @ InterpolatedStringNode (location: (21,2)-(21,6)) │ │ │ ├── opening_loc: (21,2)-(21,6) = "<<~E" │ │ │ ├── parts: (length: 2) - │ │ │ │ ├── @ StringNode (location: (22,0)-(22,0)) + │ │ │ │ ├── @ StringNode (location: (22,0)-(23,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (22,0)-(22,0) = " \tx\n" + │ │ │ │ │ ├── content_loc: (22,0)-(23,0) = " \tx\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "x\n" - │ │ │ │ └── @ StringNode (location: (23,0)-(23,0)) + │ │ │ │ └── @ StringNode (location: (23,0)-(24,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (23,0)-(23,0) = " y\n" + │ │ │ │ ├── content_loc: (23,0)-(24,0) = " y\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "y\n" - │ │ │ └── closing_loc: (24,0)-(24,0) = "E\n" + │ │ │ └── closing_loc: (24,0)-(25,0) = "E\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -187,19 +187,19 @@ │ │ │ └── @ InterpolatedStringNode (location: (26,2)-(26,6)) │ │ │ ├── opening_loc: (26,2)-(26,6) = "<<~E" │ │ │ ├── parts: (length: 2) - │ │ │ │ ├── @ StringNode (location: (27,0)-(27,0)) + │ │ │ │ ├── @ StringNode (location: (27,0)-(28,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (27,0)-(27,0) = " \tx\n" + │ │ │ │ │ ├── content_loc: (27,0)-(28,0) = " \tx\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "\tx\n" - │ │ │ │ └── @ StringNode (location: (28,0)-(28,0)) + │ │ │ │ └── @ StringNode (location: (28,0)-(29,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (28,0)-(28,0) = "\ty\n" + │ │ │ │ ├── content_loc: (28,0)-(29,0) = "\ty\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "y\n" - │ │ │ └── closing_loc: (29,0)-(29,0) = "E\n" + │ │ │ └── closing_loc: (29,0)-(30,0) = "E\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -216,19 +216,19 @@ │ │ │ └── @ InterpolatedStringNode (location: (31,2)-(31,6)) │ │ │ ├── opening_loc: (31,2)-(31,6) = "<<~E" │ │ │ ├── parts: (length: 2) - │ │ │ │ ├── @ StringNode (location: (32,0)-(32,0)) + │ │ │ │ ├── @ StringNode (location: (32,0)-(33,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (32,0)-(32,0) = " x\n" + │ │ │ │ │ ├── content_loc: (32,0)-(33,0) = " x\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: " x\n" - │ │ │ │ └── @ StringNode (location: (33,0)-(33,0)) + │ │ │ │ └── @ StringNode (location: (33,0)-(34,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (33,0)-(33,0) = " \\\ty\n" + │ │ │ │ ├── content_loc: (33,0)-(34,0) = " \\\ty\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "\ty\n" - │ │ │ └── closing_loc: (34,0)-(34,0) = "E\n" + │ │ │ └── closing_loc: (34,0)-(35,0) = "E\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -245,19 +245,19 @@ │ │ │ └── @ InterpolatedStringNode (location: (36,2)-(36,6)) │ │ │ ├── opening_loc: (36,2)-(36,6) = "<<~E" │ │ │ ├── parts: (length: 2) - │ │ │ │ ├── @ StringNode (location: (37,0)-(37,0)) + │ │ │ │ ├── @ StringNode (location: (37,0)-(38,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (37,0)-(37,0) = " x\n" + │ │ │ │ │ ├── content_loc: (37,0)-(38,0) = " x\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: " x\n" - │ │ │ │ └── @ StringNode (location: (38,0)-(38,0)) + │ │ │ │ └── @ StringNode (location: (38,0)-(39,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (38,0)-(38,0) = " \\ y\n" + │ │ │ │ ├── content_loc: (38,0)-(39,0) = " \\ y\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: " y\n" - │ │ │ └── closing_loc: (39,0)-(39,0) = "E\n" + │ │ │ └── closing_loc: (39,0)-(40,0) = "E\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -274,8 +274,8 @@ │ │ │ └── @ StringNode (location: (41,2)-(41,6)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (41,2)-(41,6) = "<<~E" - │ │ │ ├── content_loc: (42,0)-(41,0) = "" - │ │ │ ├── closing_loc: (42,0)-(42,0) = " E\n" + │ │ │ ├── content_loc: (42,0)-(42,0) = "" + │ │ │ ├── closing_loc: (42,0)-(43,0) = " E\n" │ │ │ └── unescaped: "" │ │ └── flags: ∅ │ ├── closing_loc: ∅ @@ -293,25 +293,25 @@ │ │ │ └── @ InterpolatedStringNode (location: (44,2)-(44,6)) │ │ │ ├── opening_loc: (44,2)-(44,6) = "<<~E" │ │ │ ├── parts: (length: 3) - │ │ │ │ ├── @ StringNode (location: (45,0)-(45,0)) + │ │ │ │ ├── @ StringNode (location: (45,0)-(46,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (45,0)-(45,0) = " x\n" + │ │ │ │ │ ├── content_loc: (45,0)-(46,0) = " x\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: " x\n" - │ │ │ │ ├── @ StringNode (location: (46,0)-(46,0)) + │ │ │ │ ├── @ StringNode (location: (46,0)-(47,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (46,0)-(46,0) = "\n" + │ │ │ │ │ ├── content_loc: (46,0)-(47,0) = "\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "\n" - │ │ │ │ └── @ StringNode (location: (47,0)-(47,0)) + │ │ │ │ └── @ StringNode (location: (47,0)-(48,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (47,0)-(47,0) = "y\n" + │ │ │ │ ├── content_loc: (47,0)-(48,0) = "y\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "y\n" - │ │ │ └── closing_loc: (48,0)-(48,0) = "E\n" + │ │ │ └── closing_loc: (48,0)-(49,0) = "E\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -328,25 +328,25 @@ │ │ │ └── @ InterpolatedStringNode (location: (50,2)-(50,6)) │ │ │ ├── opening_loc: (50,2)-(50,6) = "<<~E" │ │ │ ├── parts: (length: 3) - │ │ │ │ ├── @ StringNode (location: (51,0)-(51,0)) + │ │ │ │ ├── @ StringNode (location: (51,0)-(52,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (51,0)-(51,0) = " x\n" + │ │ │ │ │ ├── content_loc: (51,0)-(52,0) = " x\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "x\n" - │ │ │ │ ├── @ StringNode (location: (52,0)-(52,0)) + │ │ │ │ ├── @ StringNode (location: (52,0)-(53,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (52,0)-(52,0) = " \n" + │ │ │ │ │ ├── content_loc: (52,0)-(53,0) = " \n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: " \n" - │ │ │ │ └── @ StringNode (location: (53,0)-(53,0)) + │ │ │ │ └── @ StringNode (location: (53,0)-(54,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (53,0)-(53,0) = " y\n" + │ │ │ │ ├── content_loc: (53,0)-(54,0) = " y\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "y\n" - │ │ │ └── closing_loc: (54,0)-(54,0) = "E\n" + │ │ │ └── closing_loc: (54,0)-(55,0) = "E\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -363,19 +363,19 @@ │ │ │ └── @ InterpolatedStringNode (location: (56,2)-(56,6)) │ │ │ ├── opening_loc: (56,2)-(56,6) = "<<~E" │ │ │ ├── parts: (length: 2) - │ │ │ │ ├── @ StringNode (location: (57,0)-(57,0)) + │ │ │ │ ├── @ StringNode (location: (57,0)-(58,0)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (57,0)-(57,0) = " x\n" + │ │ │ │ │ ├── content_loc: (57,0)-(58,0) = " x\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "x\n" - │ │ │ │ └── @ StringNode (location: (58,0)-(58,0)) + │ │ │ │ └── @ StringNode (location: (58,0)-(59,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (58,0)-(58,0) = " y\n" + │ │ │ │ ├── content_loc: (58,0)-(59,0) = " y\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: " y\n" - │ │ │ └── closing_loc: (59,0)-(59,0) = "E\n" + │ │ │ └── closing_loc: (59,0)-(60,0) = "E\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ │ ├── block: ∅ @@ -392,8 +392,8 @@ │ │ │ └── @ StringNode (location: (61,2)-(61,6)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (61,2)-(61,6) = "<<~E" - │ │ │ ├── content_loc: (62,0)-(62,0) = " x\n" - │ │ │ ├── closing_loc: (63,0)-(63,0) = "E\n" + │ │ │ ├── content_loc: (62,0)-(63,0) = " x\n" + │ │ │ ├── closing_loc: (63,0)-(64,0) = "E\n" │ │ │ └── unescaped: "x\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ @@ -411,8 +411,8 @@ │ │ │ └── @ StringNode (location: (65,2)-(65,6)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (65,2)-(65,6) = "<<~E" - │ │ │ ├── content_loc: (66,0)-(66,0) = " ð\n" - │ │ │ ├── closing_loc: (67,0)-(67,0) = "E\n" + │ │ │ ├── content_loc: (66,0)-(67,0) = " ð\n" + │ │ │ ├── closing_loc: (67,0)-(68,0) = "E\n" │ │ │ └── unescaped: "ð\n" │ │ └── flags: ∅ │ ├── closing_loc: ∅ @@ -430,8 +430,8 @@ │ │ │ └── @ StringNode (location: (69,2)-(69,6)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (69,2)-(69,6) = "<<~E" - │ │ │ ├── content_loc: (70,0)-(69,0) = "" - │ │ │ ├── closing_loc: (70,0)-(70,0) = "E\n" + │ │ │ ├── content_loc: (70,0)-(70,0) = "" + │ │ │ ├── closing_loc: (70,0)-(71,0) = "E\n" │ │ │ └── unescaped: "" │ │ └── flags: ∅ │ ├── closing_loc: ∅ @@ -449,10 +449,10 @@ │ │ └── @ InterpolatedXStringNode (location: (72,2)-(72,8)) │ │ ├── opening_loc: (72,2)-(72,8) = "<<~`E`" │ │ ├── parts: (length: 3) - │ │ │ ├── @ StringNode (location: (73,0)-(73,0)) + │ │ │ ├── @ StringNode (location: (73,0)-(74,0)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (73,0)-(73,0) = " x\n" + │ │ │ │ ├── content_loc: (73,0)-(74,0) = " x\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: " x\n" │ │ │ ├── @ EmbeddedStatementsNode (location: (74,2)-(74,8)) @@ -471,13 +471,13 @@ │ │ │ │ │ ├── flags: variable_call │ │ │ │ │ └── name: :foo │ │ │ │ └── closing_loc: (74,7)-(74,8) = "}" - │ │ │ └── @ StringNode (location: (74,8)-(74,0)) + │ │ │ └── @ StringNode (location: (74,8)-(75,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (74,8)-(74,0) = "\n" + │ │ │ ├── content_loc: (74,8)-(75,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" - │ │ └── closing_loc: (75,0)-(75,0) = "E\n" + │ │ └── closing_loc: (75,0)-(76,0) = "E\n" │ └── flags: ∅ ├── closing_loc: ∅ ├── block: ∅ diff --git a/test/prism/snapshots/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt b/test/prism/snapshots/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt index aa9b58063c..cc5be3d967 100644 --- a/test/prism/snapshots/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt +++ b/test/prism/snapshots/whitequark/dedenting_interpolating_heredoc_fake_line_continuation.txt @@ -6,16 +6,16 @@ └── @ InterpolatedStringNode (location: (1,0)-(1,8)) ├── opening_loc: (1,0)-(1,8) = "<<~'FOO'" ├── parts: (length: 2) - │ ├── @ StringNode (location: (2,0)-(2,0)) + │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (2,0)-(2,0) = " baz\\\\\n" + │ │ ├── content_loc: (2,0)-(3,0) = " baz\\\\\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "baz\\\\\n" - │ └── @ StringNode (location: (3,0)-(3,0)) + │ └── @ StringNode (location: (3,0)-(4,0)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (3,0)-(3,0) = " qux\n" + │ ├── content_loc: (3,0)-(4,0) = " qux\n" │ ├── closing_loc: ∅ │ └── unescaped: "qux\n" - └── closing_loc: (4,0)-(4,0) = "FOO\n" + └── closing_loc: (4,0)-(5,0) = "FOO\n" diff --git a/test/prism/snapshots/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt b/test/prism/snapshots/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt index 5f2502dac8..d9f7fe2ec7 100644 --- a/test/prism/snapshots/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt +++ b/test/prism/snapshots/whitequark/dedenting_non_interpolating_heredoc_line_continuation.txt @@ -6,16 +6,16 @@ └── @ InterpolatedStringNode (location: (1,0)-(1,8)) ├── opening_loc: (1,0)-(1,8) = "<<~'FOO'" ├── parts: (length: 2) - │ ├── @ StringNode (location: (2,0)-(2,0)) + │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (2,0)-(2,0) = " baz\\\n" + │ │ ├── content_loc: (2,0)-(3,0) = " baz\\\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "baz\\\n" - │ └── @ StringNode (location: (3,0)-(3,0)) + │ └── @ StringNode (location: (3,0)-(4,0)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (3,0)-(3,0) = " qux\n" + │ ├── content_loc: (3,0)-(4,0) = " qux\n" │ ├── closing_loc: ∅ │ └── unescaped: "qux\n" - └── closing_loc: (4,0)-(4,0) = "FOO\n" + └── closing_loc: (4,0)-(5,0) = "FOO\n" diff --git a/test/prism/snapshots/whitequark/empty_stmt.txt b/test/prism/snapshots/whitequark/empty_stmt.txt index 870bdb6ad5..3a21ce5559 100644 --- a/test/prism/snapshots/whitequark/empty_stmt.txt +++ b/test/prism/snapshots/whitequark/empty_stmt.txt @@ -1,5 +1,5 @@ -@ ProgramNode (location: (1,0)-(0,0)) +@ ProgramNode (location: (1,0)-(1,0)) ├── locals: [] └── statements: - @ StatementsNode (location: (1,0)-(0,0)) + @ StatementsNode (location: (1,0)-(1,0)) └── body: (length: 0) diff --git a/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt b/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt index f7982e06de..92635f0b8b 100644 --- a/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt +++ b/test/prism/snapshots/whitequark/forwarded_argument_with_kwrestarg.txt @@ -18,7 +18,7 @@ │ ├── keywords: (length: 0) │ ├── keyword_rest: │ │ @ KeywordRestParameterNode (location: (1,18)-(1,20)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (1,18)-(1,20) = "**" │ └── block: ∅ diff --git a/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt b/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt index 2f8eb2c43a..071d15a496 100644 --- a/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt +++ b/test/prism/snapshots/whitequark/forwarded_argument_with_restarg.txt @@ -15,7 +15,7 @@ │ ├── optionals: (length: 0) │ ├── rest: │ │ @ RestParameterNode (location: (1,18)-(1,19)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (1,18)-(1,19) = "*" │ ├── posts: (length: 0) diff --git a/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt b/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt index e248648b65..c1bc2b7069 100644 --- a/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt +++ b/test/prism/snapshots/whitequark/forwarded_kwrestarg.txt @@ -16,7 +16,7 @@ │ ├── keywords: (length: 0) │ ├── keyword_rest: │ │ @ KeywordRestParameterNode (location: (1,8)-(1,10)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (1,8)-(1,10) = "**" │ └── block: ∅ diff --git a/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt b/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt index a55164f222..29ba99b164 100644 --- a/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt +++ b/test/prism/snapshots/whitequark/forwarded_kwrestarg_with_additional_kwarg.txt @@ -16,7 +16,7 @@ │ ├── keywords: (length: 0) │ ├── keyword_rest: │ │ @ KeywordRestParameterNode (location: (1,8)-(1,10)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (1,8)-(1,10) = "**" │ └── block: ∅ diff --git a/test/prism/snapshots/whitequark/forwarded_restarg.txt b/test/prism/snapshots/whitequark/forwarded_restarg.txt index 3ee8abbff9..61333d9170 100644 --- a/test/prism/snapshots/whitequark/forwarded_restarg.txt +++ b/test/prism/snapshots/whitequark/forwarded_restarg.txt @@ -13,7 +13,7 @@ │ ├── optionals: (length: 0) │ ├── rest: │ │ @ RestParameterNode (location: (1,8)-(1,9)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (1,8)-(1,9) = "*" │ ├── posts: (length: 0) diff --git a/test/prism/snapshots/whitequark/heredoc.txt b/test/prism/snapshots/whitequark/heredoc.txt index 35e6d8be63..0d718c6945 100644 --- a/test/prism/snapshots/whitequark/heredoc.txt +++ b/test/prism/snapshots/whitequark/heredoc.txt @@ -6,17 +6,17 @@ ├── @ StringNode (location: (1,0)-(1,8)) │ ├── flags: ∅ │ ├── opening_loc: (1,0)-(1,8) = "<<'HERE'" - │ ├── content_loc: (2,0)-(3,0) = "foo\nbar\n" - │ ├── closing_loc: (4,0)-(4,0) = "HERE\n" + │ ├── content_loc: (2,0)-(4,0) = "foo\nbar\n" + │ ├── closing_loc: (4,0)-(5,0) = "HERE\n" │ └── unescaped: "foo\nbar\n" ├── @ StringNode (location: (6,0)-(6,6)) │ ├── flags: ∅ │ ├── opening_loc: (6,0)-(6,6) = "<<HERE" - │ ├── content_loc: (7,0)-(8,0) = "foo\nbar\n" - │ ├── closing_loc: (9,0)-(9,0) = "HERE\n" + │ ├── content_loc: (7,0)-(9,0) = "foo\nbar\n" + │ ├── closing_loc: (9,0)-(10,0) = "HERE\n" │ └── unescaped: "foo\nbar\n" └── @ XStringNode (location: (11,0)-(11,8)) ├── opening_loc: (11,0)-(11,8) = "<<`HERE`" - ├── content_loc: (12,0)-(13,0) = "foo\nbar\n" - ├── closing_loc: (14,0)-(14,0) = "HERE\n" + ├── content_loc: (12,0)-(14,0) = "foo\nbar\n" + ├── closing_loc: (14,0)-(15,0) = "HERE\n" └── unescaped: "foo\nbar\n" diff --git a/test/prism/snapshots/whitequark/interp_digit_var.txt b/test/prism/snapshots/whitequark/interp_digit_var.txt index 2a97bf5780..cb13903498 100644 --- a/test/prism/snapshots/whitequark/interp_digit_var.txt +++ b/test/prism/snapshots/whitequark/interp_digit_var.txt @@ -216,34 +216,34 @@ ├── @ StringNode (location: (65,0)-(65,9)) │ ├── flags: ∅ │ ├── opening_loc: (65,0)-(65,9) = "<<-\"HERE\"" - │ ├── content_loc: (66,0)-(66,0) = "\#@1\n" - │ ├── closing_loc: (67,0)-(67,0) = "HERE\n" + │ ├── content_loc: (66,0)-(67,0) = "\#@1\n" + │ ├── closing_loc: (67,0)-(68,0) = "HERE\n" │ └── unescaped: "\#@1\n" ├── @ StringNode (location: (69,0)-(69,9)) │ ├── flags: ∅ │ ├── opening_loc: (69,0)-(69,9) = "<<-\"HERE\"" - │ ├── content_loc: (70,0)-(70,0) = "\#@@1\n" - │ ├── closing_loc: (71,0)-(71,0) = "HERE\n" + │ ├── content_loc: (70,0)-(71,0) = "\#@@1\n" + │ ├── closing_loc: (71,0)-(72,0) = "HERE\n" │ └── unescaped: "\#@@1\n" ├── @ StringNode (location: (73,0)-(73,9)) │ ├── flags: ∅ │ ├── opening_loc: (73,0)-(73,9) = "<<-'HERE'" - │ ├── content_loc: (74,0)-(74,0) = "\#@1\n" - │ ├── closing_loc: (75,0)-(75,0) = "HERE\n" + │ ├── content_loc: (74,0)-(75,0) = "\#@1\n" + │ ├── closing_loc: (75,0)-(76,0) = "HERE\n" │ └── unescaped: "\#@1\n" ├── @ StringNode (location: (77,0)-(77,9)) │ ├── flags: ∅ │ ├── opening_loc: (77,0)-(77,9) = "<<-'HERE'" - │ ├── content_loc: (78,0)-(78,0) = "\#@@1\n" - │ ├── closing_loc: (79,0)-(79,0) = "HERE\n" + │ ├── content_loc: (78,0)-(79,0) = "\#@@1\n" + │ ├── closing_loc: (79,0)-(80,0) = "HERE\n" │ └── unescaped: "\#@@1\n" ├── @ XStringNode (location: (81,0)-(81,9)) │ ├── opening_loc: (81,0)-(81,9) = "<<-`HERE`" - │ ├── content_loc: (82,0)-(82,0) = "\#@1\n" - │ ├── closing_loc: (83,0)-(83,0) = "HERE\n" + │ ├── content_loc: (82,0)-(83,0) = "\#@1\n" + │ ├── closing_loc: (83,0)-(84,0) = "HERE\n" │ └── unescaped: "\#@1\n" └── @ XStringNode (location: (85,0)-(85,9)) ├── opening_loc: (85,0)-(85,9) = "<<-`HERE`" - ├── content_loc: (86,0)-(86,0) = "\#@@1\n" - ├── closing_loc: (87,0)-(87,0) = "HERE\n" + ├── content_loc: (86,0)-(87,0) = "\#@@1\n" + ├── closing_loc: (87,0)-(88,0) = "HERE\n" └── unescaped: "\#@@1\n" diff --git a/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt b/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt index 23cf91f7a5..930ee91c29 100644 --- a/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt +++ b/test/prism/snapshots/whitequark/kwoptarg_with_kwrestarg_and_forwarded_args.txt @@ -21,7 +21,7 @@ │ │ @ NilNode (location: (1,9)-(1,12)) │ ├── keyword_rest: │ │ @ KeywordRestParameterNode (location: (1,14)-(1,16)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (1,14)-(1,16) = "**" │ └── block: ∅ diff --git a/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt b/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt index 9c3d0e628f..8de0299ad6 100644 --- a/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt +++ b/test/prism/snapshots/whitequark/kwrestarg_unnamed.txt @@ -16,7 +16,7 @@ │ ├── keywords: (length: 0) │ ├── keyword_rest: │ │ @ KeywordRestParameterNode (location: (1,6)-(1,8)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (1,6)-(1,8) = "**" │ └── block: ∅ diff --git a/test/prism/snapshots/whitequark/parser_bug_640.txt b/test/prism/snapshots/whitequark/parser_bug_640.txt index 1363dabe3b..0320011e2e 100644 --- a/test/prism/snapshots/whitequark/parser_bug_640.txt +++ b/test/prism/snapshots/whitequark/parser_bug_640.txt @@ -6,6 +6,6 @@ └── @ StringNode (location: (1,0)-(1,6)) ├── flags: ∅ ├── opening_loc: (1,0)-(1,6) = "<<~FOO" - ├── content_loc: (2,0)-(3,0) = " baz\\\n qux\n" - ├── closing_loc: (4,0)-(4,0) = "FOO\n" + ├── content_loc: (2,0)-(4,0) = " baz\\\n qux\n" + ├── closing_loc: (4,0)-(5,0) = "FOO\n" └── unescaped: "baz qux\n" diff --git a/test/prism/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt b/test/prism/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt index 8a041058b8..d974435534 100644 --- a/test/prism/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt +++ b/test/prism/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt @@ -10,10 +10,10 @@ │ │ ├── opening_loc: (2,2)-(2,4) = "\#{" │ │ ├── statements: ∅ │ │ └── closing_loc: (2,4)-(2,5) = "}" - │ └── @ StringNode (location: (2,5)-(2,0)) + │ └── @ StringNode (location: (2,5)-(3,0)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (2,5)-(2,0) = "\n" + │ ├── content_loc: (2,5)-(3,0) = "\n" │ ├── closing_loc: ∅ │ └── unescaped: "\n" - └── closing_loc: (3,0)-(3,0) = "HERE\n" + └── closing_loc: (3,0)-(4,0) = "HERE\n" diff --git a/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt b/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt index 35e53c9bef..932a7bfbac 100644 --- a/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt +++ b/test/prism/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt @@ -106,19 +106,19 @@ ├── @ StringNode (location: (46,0)-(46,9)) │ ├── flags: ∅ │ ├── opening_loc: (46,0)-(46,9) = "<<-\"HERE\"" - │ ├── content_loc: (47,0)-(48,0) = "a\\\nb\n" - │ ├── closing_loc: (49,0)-(49,0) = "HERE\n" + │ ├── content_loc: (47,0)-(49,0) = "a\\\nb\n" + │ ├── closing_loc: (49,0)-(50,0) = "HERE\n" │ └── unescaped: "ab\n" ├── @ StringNode (location: (51,0)-(51,9)) │ ├── flags: ∅ │ ├── opening_loc: (51,0)-(51,9) = "<<-'HERE'" - │ ├── content_loc: (52,0)-(53,0) = "a\\\nb\n" - │ ├── closing_loc: (54,0)-(54,0) = "HERE\n" + │ ├── content_loc: (52,0)-(54,0) = "a\\\nb\n" + │ ├── closing_loc: (54,0)-(55,0) = "HERE\n" │ └── unescaped: "a\\\nb\n" ├── @ XStringNode (location: (56,0)-(56,9)) │ ├── opening_loc: (56,0)-(56,9) = "<<-`HERE`" - │ ├── content_loc: (57,0)-(58,0) = "a\\\nb\n" - │ ├── closing_loc: (59,0)-(59,0) = "HERE\n" + │ ├── content_loc: (57,0)-(59,0) = "a\\\nb\n" + │ ├── closing_loc: (59,0)-(60,0) = "HERE\n" │ └── unescaped: "ab\n" └── @ XStringNode (location: (61,0)-(62,2)) ├── opening_loc: (61,0)-(61,1) = "`" diff --git a/test/prism/snapshots/whitequark/restarg_unnamed.txt b/test/prism/snapshots/whitequark/restarg_unnamed.txt index 82e8f3f7ab..d22ad86509 100644 --- a/test/prism/snapshots/whitequark/restarg_unnamed.txt +++ b/test/prism/snapshots/whitequark/restarg_unnamed.txt @@ -13,7 +13,7 @@ │ ├── optionals: (length: 0) │ ├── rest: │ │ @ RestParameterNode (location: (1,6)-(1,7)) - │ │ ├── name: nil + │ │ ├── name: ∅ │ │ ├── name_loc: ∅ │ │ └── operator_loc: (1,6)-(1,7) = "*" │ ├── posts: (length: 0) diff --git a/test/prism/snapshots/whitequark/ruby_bug_11989.txt b/test/prism/snapshots/whitequark/ruby_bug_11989.txt index 2590bc6ae7..84fb2d4f0a 100644 --- a/test/prism/snapshots/whitequark/ruby_bug_11989.txt +++ b/test/prism/snapshots/whitequark/ruby_bug_11989.txt @@ -14,8 +14,8 @@ │ │ └── @ StringNode (location: (1,2)-(1,8)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (1,2)-(1,8) = "<<~\"E\"" - │ │ ├── content_loc: (2,0)-(2,0) = " x\\n y\n" - │ │ ├── closing_loc: (3,0)-(3,0) = "E\n" + │ │ ├── content_loc: (2,0)-(3,0) = " x\\n y\n" + │ │ ├── closing_loc: (3,0)-(4,0) = "E\n" │ │ └── unescaped: "x\n y\n" │ └── flags: ∅ ├── closing_loc: ∅ diff --git a/test/prism/snapshots/whitequark/ruby_bug_11990.txt b/test/prism/snapshots/whitequark/ruby_bug_11990.txt index 7070e96791..54532e329c 100644 --- a/test/prism/snapshots/whitequark/ruby_bug_11990.txt +++ b/test/prism/snapshots/whitequark/ruby_bug_11990.txt @@ -16,8 +16,8 @@ │ │ │ @ StringNode (location: (1,2)-(1,6)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (1,2)-(1,6) = "<<~E" - │ │ │ ├── content_loc: (2,0)-(2,0) = " x\n" - │ │ │ ├── closing_loc: (3,0)-(3,0) = "E\n" + │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n" + │ │ │ ├── closing_loc: (3,0)-(4,0) = "E\n" │ │ │ └── unescaped: "x\n" │ │ └── right: │ │ @ StringNode (location: (1,7)-(1,12)) diff --git a/test/prism/snapshots/whitequark/send_lambda.txt b/test/prism/snapshots/whitequark/send_lambda.txt index aa21442971..bd3e74119f 100644 --- a/test/prism/snapshots/whitequark/send_lambda.txt +++ b/test/prism/snapshots/whitequark/send_lambda.txt @@ -16,7 +16,7 @@ │ │ │ ├── optionals: (length: 0) │ │ │ ├── rest: │ │ │ │ @ RestParameterNode (location: (1,3)-(1,4)) - │ │ │ │ ├── name: nil + │ │ │ │ ├── name: ∅ │ │ │ │ ├── name_loc: ∅ │ │ │ │ └── operator_loc: (1,3)-(1,4) = "*" │ │ │ ├── posts: (length: 0) diff --git a/test/prism/snapshots/whitequark/slash_newline_in_heredocs.txt b/test/prism/snapshots/whitequark/slash_newline_in_heredocs.txt index f7a249946a..58a134dd62 100644 --- a/test/prism/snapshots/whitequark/slash_newline_in_heredocs.txt +++ b/test/prism/snapshots/whitequark/slash_newline_in_heredocs.txt @@ -6,22 +6,22 @@ ├── @ StringNode (location: (1,0)-(1,4)) │ ├── flags: ∅ │ ├── opening_loc: (1,0)-(1,4) = "<<-E" - │ ├── content_loc: (2,0)-(4,0) = " 1 \\\n 2\n 3\n" - │ ├── closing_loc: (5,0)-(5,0) = "E\n" + │ ├── content_loc: (2,0)-(5,0) = " 1 \\\n 2\n 3\n" + │ ├── closing_loc: (5,0)-(6,0) = "E\n" │ └── unescaped: " 1 2\n 3\n" └── @ InterpolatedStringNode (location: (8,0)-(8,4)) ├── opening_loc: (8,0)-(8,4) = "<<~E" ├── parts: (length: 2) - │ ├── @ StringNode (location: (9,0)-(10,0)) + │ ├── @ StringNode (location: (9,0)-(11,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (9,0)-(10,0) = " 1 \\\n 2\n" + │ │ ├── content_loc: (9,0)-(11,0) = " 1 \\\n 2\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "1 2\n" - │ └── @ StringNode (location: (11,0)-(11,0)) + │ └── @ StringNode (location: (11,0)-(12,0)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (11,0)-(11,0) = " 3\n" + │ ├── content_loc: (11,0)-(12,0) = " 3\n" │ ├── closing_loc: ∅ │ └── unescaped: "3\n" - └── closing_loc: (12,0)-(12,0) = "E\n" + └── closing_loc: (12,0)-(13,0) = "E\n" |