From 02353742bf8cfd45f7cedc201d79870771917f93 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Thu, 27 Aug 2026 14:59:49 +0200 Subject: [PATCH] Rename `content` fields to `value` Currently there are 43 matches for `name: value` and only 4 for `name: content` in `config.yml` `RationalNode`/`ImaginaryNode` also have `value` from node extensions. The one I particularly care about is `StringNode` because I often handle `SymbolNode` and `StringNode` the same way but I have to write different code becaues the fields are not named the same. This allows to ducktype them and I don't have to keep in mind when to use content vs value. `value` for a literal sounds better to me. --- config.yml | 8 +- lib/prism/node_ext.rb | 52 ++++- lib/prism/translation/parser/compiler.rb | 36 +-- lib/prism/translation/ripper.rb | 46 ++-- lib/prism/translation/ruby_parser.rb | 4 +- rbi/generated/prism/dsl.rbi | 16 +- rbi/generated/prism/node.rbi | 80 +++---- rbi/generated/prism/node_ext.rbi | 32 +++ rust/ruby-prism-sys/src/bindings.rs | 16 +- sig/generated/prism/dsl.rbs | 16 +- sig/generated/prism/node.rbs | 104 ++++----- sig/generated/prism/node_ext.rbs | 32 +++ snapshots/3.3-4.0/void_value.txt | 4 +- .../4.0/endless_methods_command_call.txt | 14 +- snapshots/4.1/void_value.txt | 2 +- snapshots/alias.txt | 2 +- snapshots/arrays.txt | 26 +-- snapshots/begin_rescue.txt | 2 +- snapshots/character_literal.txt | 4 +- snapshots/command_method_call_3.txt | 20 +- snapshots/dash_heredocs.txt | 42 ++-- snapshots/defined.txt | 2 +- snapshots/dos_endings.txt | 12 +- snapshots/dstring.txt | 32 +-- snapshots/encoding_binary.txt | 6 +- snapshots/encoding_euc_jp.txt | 4 +- snapshots/endless_methods.txt | 2 +- .../escaped_newline_with_trailing_content.txt | 2 +- snapshots/heredoc.txt | 2 +- .../heredoc_dedent_line_continuation.txt | 6 +- .../heredoc_percent_q_newline_delimiter.txt | 14 +- snapshots/heredoc_with_carriage_returns.txt | 2 +- snapshots/heredoc_with_comment.txt | 2 +- .../heredoc_with_escaped_newline_at_start.txt | 12 +- snapshots/heredoc_with_trailing_newline.txt | 2 +- snapshots/heredocs_leading_whitespace.txt | 16 +- snapshots/heredocs_nested.txt | 14 +- snapshots/heredocs_with_fake_newlines.txt | 54 ++--- snapshots/heredocs_with_ignored_newlines.txt | 20 +- ...cs_with_ignored_newlines_and_non_empty.txt | 2 +- snapshots/keyword_method_names.txt | 4 +- snapshots/lambda.txt | 2 +- snapshots/method_calls.txt | 8 +- snapshots/methods.txt | 8 +- snapshots/modules.txt | 4 +- snapshots/newline_terminated.txt | 34 +-- snapshots/non_alphanumeric_methods.txt | 2 +- snapshots/non_void_value.txt | 10 +- snapshots/patterns.txt | 104 ++++----- snapshots/percent_array_newline_delimiter.txt | 8 +- snapshots/range_beginless.txt | 4 +- snapshots/regex.txt | 68 +++--- snapshots/regex_char_width.txt | 4 +- snapshots/regex_escape_encoding.txt | 4 +- snapshots/regex_with_fake_newlines.txt | 14 +- snapshots/rescue.txt | 2 +- snapshots/seattlerb/TestRubyParserShared.txt | 10 +- snapshots/seattlerb/array_line_breaks.txt | 4 +- snapshots/seattlerb/attrasgn_array_lhs.txt | 6 +- snapshots/seattlerb/bug190.txt | 2 +- snapshots/seattlerb/bug191.txt | 4 +- snapshots/seattlerb/bug_249.txt | 2 +- snapshots/seattlerb/bug_case_when_regexp.txt | 2 +- snapshots/seattlerb/bug_comma.txt | 2 +- snapshots/seattlerb/bug_cond_pct.txt | 2 +- snapshots/seattlerb/case_in.txt | 12 +- snapshots/seattlerb/case_in_hash_pat.txt | 4 +- .../seattlerb/case_in_hash_pat_assign.txt | 2 +- snapshots/seattlerb/difficult0_.txt | 8 +- .../seattlerb/difficult1_line_numbers2.txt | 2 +- snapshots/seattlerb/difficult2_.txt | 2 +- snapshots/seattlerb/dstr_evstr.txt | 2 +- snapshots/seattlerb/dstr_str.txt | 4 +- snapshots/seattlerb/evstr_str.txt | 2 +- .../heredoc__backslash_dos_format.txt | 2 +- snapshots/seattlerb/heredoc_backslash_nl.txt | 4 +- .../seattlerb/heredoc_bad_hex_escape.txt | 2 +- .../seattlerb/heredoc_bad_oct_escape.txt | 2 +- snapshots/seattlerb/heredoc_comma_arg.txt | 4 +- snapshots/seattlerb/heredoc_lineno.txt | 2 +- snapshots/seattlerb/heredoc_nested.txt | 6 +- snapshots/seattlerb/heredoc_squiggly.txt | 6 +- ...squiggly_blank_line_plus_interpolation.txt | 4 +- .../heredoc_squiggly_blank_lines.txt | 6 +- .../seattlerb/heredoc_squiggly_empty.txt | 2 +- .../seattlerb/heredoc_squiggly_interp.txt | 8 +- .../seattlerb/heredoc_squiggly_no_indent.txt | 2 +- snapshots/seattlerb/heredoc_squiggly_tabs.txt | 4 +- .../seattlerb/heredoc_squiggly_tabs_extra.txt | 4 +- .../heredoc_squiggly_visually_blank_lines.txt | 6 +- .../heredoc_trailing_slash_continued_call.txt | 2 +- snapshots/seattlerb/heredoc_unicode.txt | 2 +- .../heredoc_with_carriage_return_escapes.txt | 2 +- ...c_with_carriage_return_escapes_windows.txt | 2 +- ...redoc_with_extra_carriage_horrible_mix.txt | 2 +- .../heredoc_with_extra_carriage_returns.txt | 2 +- ...oc_with_extra_carriage_returns_windows.txt | 2 +- ...erpolation_and_carriage_return_escapes.txt | 4 +- ...on_and_carriage_return_escapes_windows.txt | 4 +- .../heredoc_with_not_global_interpolation.txt | 2 +- .../heredoc_with_only_carriage_returns.txt | 2 +- ...doc_with_only_carriage_returns_windows.txt | 2 +- snapshots/seattlerb/in_expr_no_case.txt | 2 +- .../interpolated_word_array_line_breaks.txt | 4 +- snapshots/seattlerb/label_vs_string.txt | 2 +- ...on_interpolated_word_array_line_breaks.txt | 4 +- .../seattlerb/parse_if_not_canonical.txt | 4 +- .../seattlerb/parse_if_not_noncanonical.txt | 4 +- .../parse_line_dstr_escaped_newline.txt | 2 +- .../parse_line_dstr_soft_newline.txt | 2 +- .../parse_line_evstr_after_break.txt | 2 +- snapshots/seattlerb/parse_line_heredoc.txt | 2 +- .../seattlerb/parse_line_heredoc_evstr.txt | 4 +- .../parse_line_heredoc_hardnewline.txt | 2 +- .../parse_line_heredoc_regexp_chars.txt | 2 +- .../seattlerb/parse_line_multiline_str.txt | 2 +- .../parse_line_multiline_str_literal_n.txt | 2 +- .../parse_line_str_with_newline_escape.txt | 2 +- .../seattlerb/parse_until_not_canonical.txt | 2 +- .../parse_until_not_noncanonical.txt | 2 +- .../seattlerb/parse_while_not_canonical.txt | 2 +- .../parse_while_not_noncanonical.txt | 2 +- snapshots/seattlerb/pctW_lineno.txt | 14 +- snapshots/seattlerb/pct_Q_backslash_nl.txt | 2 +- snapshots/seattlerb/pct_nl.txt | 2 +- .../seattlerb/pct_w_heredoc_interp_nested.txt | 10 +- snapshots/seattlerb/qsymbols_interp.txt | 2 +- snapshots/seattlerb/qw_escape.txt | 2 +- snapshots/seattlerb/qw_escape_term.txt | 2 +- .../seattlerb/read_escape_unicode_curlies.txt | 2 +- .../seattlerb/read_escape_unicode_h4.txt | 2 +- snapshots/seattlerb/regexp.txt | 10 +- snapshots/seattlerb/regexp_esc_C_slash.txt | 2 +- snapshots/seattlerb/regexp_esc_u.txt | 2 +- .../seattlerb/regexp_escape_extended.txt | 2 +- .../seattlerb/regexp_unicode_curlies.txt | 4 +- .../slashy_newlines_within_string.txt | 2 +- snapshots/seattlerb/str_backslashes.txt | 2 +- .../str_double_double_escaped_newline.txt | 2 +- .../seattlerb/str_double_escaped_newline.txt | 2 +- snapshots/seattlerb/str_double_newline.txt | 2 +- snapshots/seattlerb/str_evstr.txt | 2 +- snapshots/seattlerb/str_evstr_escape.txt | 4 +- snapshots/seattlerb/str_heredoc_interp.txt | 2 +- .../seattlerb/str_interp_ternary_or_label.txt | 6 +- .../str_lit_concat_bad_encodings.txt | 4 +- .../str_newline_hash_line_number.txt | 2 +- snapshots/seattlerb/str_pct_Q_nested.txt | 4 +- snapshots/seattlerb/str_pct_nested_nested.txt | 4 +- snapshots/seattlerb/str_pct_q.txt | 2 +- .../str_single_double_escaped_newline.txt | 2 +- .../seattlerb/str_single_escaped_newline.txt | 2 +- snapshots/seattlerb/str_single_newline.txt | 2 +- snapshots/seattlerb/str_str.txt | 4 +- snapshots/seattlerb/str_str_str.txt | 6 +- snapshots/seattlerb/words_interp.txt | 2 +- snapshots/single_quote_heredocs.txt | 2 +- snapshots/spanning_heredoc.txt | 70 +++--- snapshots/spanning_heredoc_newlines.txt | 22 +- .../string_concatination_frozen_false.txt | 10 +- .../string_concatination_frozen_true.txt | 10 +- snapshots/strings.txt | 216 +++++++++--------- snapshots/symbols.txt | 14 +- snapshots/tilde_heredocs.txt | 84 +++---- snapshots/undef.txt | 2 +- snapshots/unescaping.txt | 8 +- .../unparser/corpus/literal/assignment.txt | 30 +-- snapshots/unparser/corpus/literal/def.txt | 8 +- snapshots/unparser/corpus/literal/dstr.txt | 36 +-- snapshots/unparser/corpus/literal/if.txt | 2 +- snapshots/unparser/corpus/literal/literal.txt | 108 ++++----- snapshots/unparser/corpus/literal/send.txt | 14 +- snapshots/unparser/corpus/semantic/block.txt | 4 +- snapshots/unparser/corpus/semantic/dstr.txt | 106 ++++----- .../unparser/corpus/semantic/literal.txt | 8 +- snapshots/unparser/corpus/semantic/opasgn.txt | 4 +- snapshots/unparser/corpus/semantic/while.txt | 2 +- ...iuous_quoted_label_in_ternary_operator.txt | 2 +- snapshots/whitequark/array_symbols_interp.txt | 2 +- snapshots/whitequark/array_words.txt | 4 +- snapshots/whitequark/array_words_interp.txt | 6 +- .../whitequark/bug_ascii_8bit_in_literal.txt | 2 +- .../whitequark/bug_cmd_string_lookahead.txt | 2 +- snapshots/whitequark/bug_heredoc_do.txt | 2 +- .../whitequark/bug_regex_verification.txt | 2 +- snapshots/whitequark/case_cond.txt | 2 +- snapshots/whitequark/case_cond_else.txt | 4 +- snapshots/whitequark/case_expr.txt | 2 +- snapshots/whitequark/case_expr_else.txt | 2 +- snapshots/whitequark/character.txt | 2 +- .../whitequark/cond_match_current_line.txt | 4 +- snapshots/whitequark/dedenting_heredoc.txt | 62 ++--- ...olating_heredoc_fake_line_continuation.txt | 4 +- ...nterpolating_heredoc_line_continuation.txt | 4 +- .../endless_method_command_syntax.txt | 16 +- snapshots/whitequark/hash_hashrocket.txt | 2 +- snapshots/whitequark/hash_label_end.txt | 2 +- snapshots/whitequark/heredoc.txt | 6 +- snapshots/whitequark/interp_digit_var.txt | 56 ++--- snapshots/whitequark/lvar_injecting_match.txt | 12 +- .../whitequark/non_lvar_injecting_match.txt | 4 +- snapshots/whitequark/parser_bug_640.txt | 4 +- snapshots/whitequark/parser_bug_830.txt | 2 +- snapshots/whitequark/parser_bug_989.txt | 2 +- ...ps_truncated_parts_of_squiggly_heredoc.txt | 2 +- ...ser_slash_slash_n_escaping_in_literals.txt | 28 +-- .../pattern_matching_implicit_array_match.txt | 2 +- snapshots/whitequark/regex_interp.txt | 4 +- snapshots/whitequark/regex_plain.txt | 2 +- snapshots/whitequark/ruby_bug_11873.txt | 24 +- snapshots/whitequark/ruby_bug_11989.txt | 2 +- snapshots/whitequark/ruby_bug_11990.txt | 4 +- snapshots/whitequark/ruby_bug_12073.txt | 2 +- snapshots/whitequark/ruby_bug_19539.txt | 4 +- .../whitequark/slash_newline_in_heredocs.txt | 8 +- snapshots/whitequark/string_concat.txt | 4 +- snapshots/whitequark/string_dvar.txt | 4 +- snapshots/whitequark/string_interp.txt | 4 +- snapshots/whitequark/string_plain.txt | 4 +- snapshots/whitequark/symbol_interp.txt | 4 +- snapshots/whitequark/undef.txt | 2 +- snapshots/whitequark/when_multi.txt | 4 +- snapshots/whitequark/when_then.txt | 2 +- snapshots/whitequark/xstring_interp.txt | 4 +- snapshots/whitequark/xstring_plain.txt | 2 +- snapshots/write_command_operator.txt | 4 +- snapshots/xstring.txt | 18 +- snapshots/xstring_with_backslash.txt | 2 +- src/prism.c | 10 +- src/regexp.c | 6 +- 230 files changed, 1308 insertions(+), 1196 deletions(-) diff --git a/config.yml b/config.yml index 4892089c03..42b523dc9e 100644 --- a/config.yml +++ b/config.yml @@ -3596,7 +3596,7 @@ nodes: fields: - name: opening_loc type: location - - name: content_loc + - name: value_loc type: location - name: closing_loc type: location @@ -4281,7 +4281,7 @@ nodes: fields: - name: opening_loc type: location - - name: content_loc + - name: value_loc type: location - name: closing_loc type: location @@ -4503,7 +4503,7 @@ nodes: fields: - name: opening_loc type: location? - - name: content_loc + - name: value_loc type: location - name: closing_loc type: location? @@ -4721,7 +4721,7 @@ nodes: fields: - name: opening_loc type: location - - name: content_loc + - name: value_loc type: location - name: closing_loc type: location diff --git a/lib/prism/node_ext.rb b/lib/prism/node_ext.rb index 03826b9a4b..6779dd9129 100644 --- a/lib/prism/node_ext.rb +++ b/lib/prism/node_ext.rb @@ -127,7 +127,7 @@ def to_interpolated location, frozen? ? InterpolatedStringNodeFlags::FROZEN : 0, opening_loc, - [copy(location: content_loc, opening_loc: nil, closing_loc: nil)], + [copy(location: value_loc, opening_loc: nil, closing_loc: nil)], closing_loc ) end @@ -152,7 +152,7 @@ def to_interpolated location, flags, opening_loc, - [StringNode.new(source, node_id, content_loc, 0, nil, content_loc, nil, unescaped)], + [StringNode.new(source, node_id, value_loc, 0, nil, value_loc, nil, unescaped)], closing_loc ) end @@ -488,5 +488,53 @@ def closing_loc # :nodoc end_keyword_loc end end + + class MatchLastLineNode < Node + #: () -> String + def content # :nodoc + value + end + + #: () -> Location + def content_loc # :nodoc + value_loc + end + end + + class RegularExpressionNode < Node + #: () -> String + def content # :nodoc + value + end + + #: () -> Location + def content_loc # :nodoc + value_loc + end + end + + class StringNode < Node + #: () -> String + def content # :nodoc + value + end + + #: () -> Location + def content_loc # :nodoc + value_loc + end + end + + class XStringNode < Node + #: () -> String + def content # :nodoc + value + end + + #: () -> Location + def content_loc # :nodoc + value_loc + end + end # :startdoc: end diff --git a/lib/prism/translation/parser/compiler.rb b/lib/prism/translation/parser/compiler.rb index 1ef30dab1b..e6aa0c98bd 100644 --- a/lib/prism/translation/parser/compiler.rb +++ b/lib/prism/translation/parser/compiler.rb @@ -78,10 +78,10 @@ def visit_array_node(node) if node.opening&.start_with?("%w", "%W", "%i", "%I") elements = node.elements.flat_map do |element| if element.is_a?(StringNode) - if element.content.include?("\n") - string_nodes_from_line_continuations(element.unescaped, element.content, element.content_loc.start_offset, node.opening) + if element.value.include?("\n") + string_nodes_from_line_continuations(element.unescaped, element.value, element.value_loc.start_offset, node.opening) else - [builder.string_internal([element.unescaped, srange(element.content_loc)])] + [builder.string_internal([element.unescaped, srange(element.value_loc)])] end elsif element.is_a?(InterpolatedStringNode) builder.string_compose( @@ -1564,12 +1564,12 @@ def visit_redo_node(node) # ^^^^^ def visit_regular_expression_node(node) parts = - if node.content == "" + if node.value == "" [] - elsif node.content.include?("\n") - string_nodes_from_line_continuations(node.unescaped, node.content, node.content_loc.start_offset, node.opening) + elsif node.value.include?("\n") + string_nodes_from_line_continuations(node.unescaped, node.value, node.value_loc.start_offset, node.opening) else - [builder.string_internal([node.unescaped, srange(node.content_loc)])] + [builder.string_internal([node.unescaped, srange(node.value_loc)])] end builder.regexp_compose( @@ -1727,10 +1727,10 @@ def visit_string_node(node) builder.string_compose(token(node.opening_loc), [], token(node.closing_loc)) else parts = - if node.content.include?("\n") - string_nodes_from_line_continuations(node.unescaped, node.content, node.content_loc.start_offset, node.opening) + if node.value.include?("\n") + string_nodes_from_line_continuations(node.unescaped, node.value, node.value_loc.start_offset, node.opening) else - [builder.string_internal([node.unescaped, srange(node.content_loc)])] + [builder.string_internal([node.unescaped, srange(node.value_loc)])] end builder.string_compose( @@ -1914,12 +1914,12 @@ def visit_x_string_node(node) end parts = - if node.content == "" + if node.value == "" [] - elsif node.content.include?("\n") - string_nodes_from_line_continuations(node.unescaped, node.content, node.content_loc.start_offset, node.opening) + elsif node.value.include?("\n") + string_nodes_from_line_continuations(node.unescaped, node.value, node.value_loc.start_offset, node.opening) else - [builder.string_internal([node.unescaped, srange(node.content_loc)])] + [builder.string_internal([node.unescaped, srange(node.value_loc)])] end builder.xstring_compose( @@ -2073,8 +2073,8 @@ def visit_heredoc(node) node.parts.each do |part| pushing = - if part.is_a?(StringNode) && part.content.include?("\n") - string_nodes_from_line_continuations(part.unescaped, part.content, part.location.start_offset, node.opening) + if part.is_a?(StringNode) && part.value.include?("\n") + string_nodes_from_line_continuations(part.unescaped, part.value, part.location.start_offset, node.opening) else [visit(part)] end @@ -2129,8 +2129,8 @@ def within_pattern # parser gem creates individual string nodes for each line the content is part of. def string_nodes_from_interpolation(node, opening) node.parts.flat_map do |part| - if part.type == :string_node && part.content.include?("\n") && part.opening_loc.nil? - string_nodes_from_line_continuations(part.unescaped, part.content, part.content_loc.start_offset, opening) + if part.type == :string_node && part.value.include?("\n") && part.opening_loc.nil? + string_nodes_from_line_continuations(part.unescaped, part.value, part.value_loc.start_offset, opening) else visit(part) end diff --git a/lib/prism/translation/ripper.rb b/lib/prism/translation/ripper.rb index d9c1e69f92..ef8ab09243 100644 --- a/lib/prism/translation/ripper.rb +++ b/lib/prism/translation/ripper.rb @@ -768,7 +768,7 @@ def visit_array_node(node) visit_words_sep(opening_loc, previous, element) bounds(element.location) - elements = on_qwords_add(elements, on_tstring_content(element.content)) + elements = on_qwords_add(elements, on_tstring_content(element.value)) previous = element end @@ -814,13 +814,13 @@ def visit_array_node(node) on_words_add( elements, if element.is_a?(StringNode) - on_word_add(on_word_new, on_tstring_content(element.content)) + on_word_add(on_word_new, on_tstring_content(element.value)) else element.parts.inject(on_word_new) do |word, part| word_part = if part.is_a?(StringNode) bounds(part.location) - on_tstring_content(part.content) + on_tstring_content(part.value) else visit(part) end @@ -859,7 +859,7 @@ def visit_array_node(node) word_part = if part.is_a?(StringNode) bounds(part.location) - on_tstring_content(part.content) + on_tstring_content(part.value) else visit(part) end @@ -2665,8 +2665,8 @@ def visit_interpolated_match_last_line_node(node) bounds(node.parts.first.location) parts = - node.parts.inject(on_regexp_new) do |content, part| - on_regexp_add(content, visit_string_content(part)) + node.parts.inject(on_regexp_new) do |value, part| + on_regexp_add(value, visit_string_content(part)) end bounds(node.closing_loc) @@ -2765,8 +2765,8 @@ def visit_interpolated_x_string_node(node) # Visit an individual part of a string-like node. private def visit_string_content(part) if part.is_a?(StringNode) - bounds(part.content_loc) - on_tstring_content(part.content) + bounds(part.value_loc) + on_tstring_content(part.value) else visit(part) end @@ -2971,8 +2971,8 @@ def visit_match_last_line_node(node) bounds(node.opening_loc) on_regexp_beg(node.opening) - bounds(node.content_loc) - tstring_content = on_tstring_content(node.content) + bounds(node.value_loc) + tstring_content = on_tstring_content(node.value) bounds(node.closing_loc) closing = on_regexp_end(node.closing) @@ -3411,14 +3411,14 @@ def visit_regular_expression_node(node) bounds(node.opening_loc) on_regexp_beg(node.opening) - if node.content.empty? + if node.value.empty? bounds(node.closing_loc) closing = on_regexp_end(node.closing) on_regexp_literal(on_regexp_new, closing) else - bounds(node.content_loc) - tstring_content = on_tstring_content(node.content) + bounds(node.value_loc) + tstring_content = on_tstring_content(node.value) bounds(node.closing_loc) closing = on_regexp_end(node.closing) @@ -3648,20 +3648,20 @@ def visit_statements_node(node) # ^^^^^ def visit_string_node(node) with_string_bounds(node) do - if (content = node.content).empty? + if (value = node.value).empty? bounds(node.location) on_string_literal(on_string_content) elsif (opening = node.opening) == "?" bounds(node.location) - on_CHAR("?#{node.content}") + on_CHAR("?#{value}") elsif opening.start_with?("<<~") heredoc = visit_heredoc_string_node(node.to_interpolated) bounds(node.location) on_string_literal(heredoc) else - bounds(node.content_loc) - tstring_content = on_tstring_content(content) + bounds(node.value_loc) + tstring_content = on_tstring_content(value) bounds(node.location) on_string_literal(on_string_add(on_string_content, tstring_content)) @@ -3720,10 +3720,10 @@ def visit_string_node(node) parts.each do |part| if part.is_a?(StringNode) - if dedent_next && !(content = part.content).chomp.empty? + if dedent_next && !(value = part.value).chomp.empty? common_whitespace = [ common_whitespace || Float::INFINITY, - content[/\A\s*/].each_char.inject(0) do |part_whitespace, char| + value[/\A\s*/].each_char.inject(0) do |part_whitespace, char| char == "\t" ? ((part_whitespace / 8 + 1) * 8) : (part_whitespace + 1) end ].min @@ -3758,7 +3758,7 @@ def visit_string_node(node) else unless string.empty? bounds(string[0].location) - result = yield result, on_tstring_content(string.map(&:content).join) + result = yield result, on_tstring_content(string.map(&:value).join) string = [] end @@ -3768,7 +3768,7 @@ def visit_string_node(node) unless string.empty? bounds(string[0].location) - result = yield result, on_tstring_content(string.map(&:content).join) + result = yield result, on_tstring_content(string.map(&:value).join) end result @@ -4037,8 +4037,8 @@ def visit_x_string_node(node) bounds(node.location) on_xstring_literal(heredoc) else - bounds(node.content_loc) - content = on_tstring_content(node.content) + bounds(node.value_loc) + content = on_tstring_content(node.value) bounds(node.location) on_xstring_literal(on_xstring_add(on_xstring_new, content)) diff --git a/lib/prism/translation/ruby_parser.rb b/lib/prism/translation/ruby_parser.rb index edb3f3bf04..120d593b09 100644 --- a/lib/prism/translation/ruby_parser.rb +++ b/lib/prism/translation/ruby_parser.rb @@ -1531,8 +1531,8 @@ def visit_x_string_node(node) result = s(node, :xstr, node.unescaped) if node.heredoc? - result.line = node.content_loc.start_line - result.line_max = node.content_loc.end_line + result.line = node.value_loc.start_line + result.line_max = node.value_loc.end_line end result diff --git a/rbi/generated/prism/dsl.rbi b/rbi/generated/prism/dsl.rbi index 75705a5278..165169796d 100644 --- a/rbi/generated/prism/dsl.rbi +++ b/rbi/generated/prism/dsl.rbi @@ -458,8 +458,8 @@ module Prism def local_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # Create a new MatchLastLineNode node. - sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String).returns(MatchLastLineNode) } - def match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: Location, value_loc: Location, closing_loc: Location, unescaped: String).returns(MatchLastLineNode) } + def match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end # Create a new MatchPredicateNode node. sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, value: Node, pattern: Node, keyword_loc: Location).returns(MatchPredicateNode) } @@ -562,8 +562,8 @@ module Prism def redo_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # Create a new RegularExpressionNode node. - sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String).returns(RegularExpressionNode) } - def regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: Location, value_loc: Location, closing_loc: Location, unescaped: String).returns(RegularExpressionNode) } + def regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end # Create a new RequiredKeywordParameterNode node. sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, name: Symbol, name_loc: Location).returns(RequiredKeywordParameterNode) } @@ -626,8 +626,8 @@ module Prism def statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end # Create a new StringNode node. - sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: ::T.nilable(Location), content_loc: Location, closing_loc: ::T.nilable(Location), unescaped: String).returns(StringNode) } - def string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: ::T.nilable(Location), value_loc: Location, closing_loc: ::T.nilable(Location), unescaped: String).returns(StringNode) } + def string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end # Create a new SuperNode node. sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, keyword_loc: Location, lparen_loc: ::T.nilable(Location), arguments: ::T.nilable(ArgumentsNode), rparen_loc: ::T.nilable(Location), block: ::T.nilable(::T.any(BlockNode, BlockArgumentNode))).returns(SuperNode) } @@ -662,8 +662,8 @@ module Prism def while_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), while_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end # Create a new XStringNode node. - sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String).returns(XStringNode) } - def x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: Location, value_loc: Location, closing_loc: Location, unescaped: String).returns(XStringNode) } + def x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end # Create a new YieldNode node. sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, keyword_loc: Location, lparen_loc: ::T.nilable(Location), arguments: ::T.nilable(ArgumentsNode), rparen_loc: ::T.nilable(Location)).returns(YieldNode) } diff --git a/rbi/generated/prism/node.rbi b/rbi/generated/prism/node.rbi index 5cb71c8192..30476b0ba4 100644 --- a/rbi/generated/prism/node.rbi +++ b/rbi/generated/prism/node.rbi @@ -9471,8 +9471,8 @@ module Prism # ^^^^^^ class MatchLastLineNode < Node # Initialize a new MatchLastLineNode node. - sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String).void } - def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: Location, value_loc: Location, closing_loc: Location, unescaped: String).void } + def initialize(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped); end # See Node.accept. sig { override.params(visitor: Visitor).returns(::T.untyped) } @@ -9496,8 +9496,8 @@ module Prism def comment_targets; end # Creates a copy of self with the given fields, using self as the template. - sig { params(node_id: Integer, location: Location, flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String).returns(MatchLastLineNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + sig { params(node_id: Integer, location: Location, flags: Integer, opening_loc: Location, value_loc: Location, closing_loc: Location, unescaped: String).returns(MatchLastLineNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end sig { override.returns(T::Array[::T.nilable(Node)]) } def deconstruct; end @@ -9569,14 +9569,14 @@ module Prism sig { params(repository: ::T.untyped).returns(Relocation::Entry) } def save_opening_loc(repository); end - # Returns the Location represented by `content_loc`. + # Returns the Location represented by `value_loc`. sig { returns(Location) } - def content_loc; end + def value_loc; end - # Save the content_loc location using the given saved source so that + # Save the value_loc location using the given saved source so that # it can be retrieved later. sig { params(repository: ::T.untyped).returns(Relocation::Entry) } - def save_content_loc(repository); end + def save_value_loc(repository); end # Returns the Location represented by `closing_loc`. sig { returns(Location) } @@ -9595,9 +9595,9 @@ module Prism sig { returns(String) } def opening; end - # Slice the location of content_loc from the source. + # Slice the location of value_loc from the source. sig { returns(String) } - def content; end + def value; end # Slice the location of closing_loc from the source. sig { returns(String) } @@ -11771,8 +11771,8 @@ module Prism # ^^^^^^ class RegularExpressionNode < Node # Initialize a new RegularExpressionNode node. - sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String).void } - def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: Location, value_loc: Location, closing_loc: Location, unescaped: String).void } + def initialize(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped); end # See Node.accept. sig { override.params(visitor: Visitor).returns(::T.untyped) } @@ -11796,8 +11796,8 @@ module Prism def comment_targets; end # Creates a copy of self with the given fields, using self as the template. - sig { params(node_id: Integer, location: Location, flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String).returns(RegularExpressionNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + sig { params(node_id: Integer, location: Location, flags: Integer, opening_loc: Location, value_loc: Location, closing_loc: Location, unescaped: String).returns(RegularExpressionNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end sig { override.returns(T::Array[::T.nilable(Node)]) } def deconstruct; end @@ -11869,14 +11869,14 @@ module Prism sig { params(repository: ::T.untyped).returns(Relocation::Entry) } def save_opening_loc(repository); end - # Returns the Location represented by `content_loc`. + # Returns the Location represented by `value_loc`. sig { returns(Location) } - def content_loc; end + def value_loc; end - # Save the content_loc location using the given saved source so that + # Save the value_loc location using the given saved source so that # it can be retrieved later. sig { params(repository: ::T.untyped).returns(Relocation::Entry) } - def save_content_loc(repository); end + def save_value_loc(repository); end # Returns the Location represented by `closing_loc`. sig { returns(Location) } @@ -11895,9 +11895,9 @@ module Prism sig { returns(String) } def opening; end - # Slice the location of content_loc from the source. + # Slice the location of value_loc from the source. sig { returns(String) } - def content; end + def value; end # Slice the location of closing_loc from the source. sig { returns(String) } @@ -13009,8 +13009,8 @@ module Prism # ^^^^ ^^^^ class StringNode < Node # Initialize a new StringNode node. - sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: ::T.nilable(Location), content_loc: Location, closing_loc: ::T.nilable(Location), unescaped: String).void } - def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: ::T.nilable(Location), value_loc: Location, closing_loc: ::T.nilable(Location), unescaped: String).void } + def initialize(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped); end # See Node.accept. sig { override.params(visitor: Visitor).returns(::T.untyped) } @@ -13034,8 +13034,8 @@ module Prism def comment_targets; end # Creates a copy of self with the given fields, using self as the template. - sig { params(node_id: Integer, location: Location, flags: Integer, opening_loc: ::T.nilable(Location), content_loc: Location, closing_loc: ::T.nilable(Location), unescaped: String).returns(StringNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + sig { params(node_id: Integer, location: Location, flags: Integer, opening_loc: ::T.nilable(Location), value_loc: Location, closing_loc: ::T.nilable(Location), unescaped: String).returns(StringNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end sig { override.returns(T::Array[::T.nilable(Node)]) } def deconstruct; end @@ -13079,14 +13079,14 @@ module Prism sig { params(repository: ::T.untyped).returns(::T.nilable(Relocation::Entry)) } def save_opening_loc(repository); end - # Returns the Location represented by `content_loc`. + # Returns the Location represented by `value_loc`. sig { returns(Location) } - def content_loc; end + def value_loc; end - # Save the content_loc location using the given saved source so that + # Save the value_loc location using the given saved source so that # it can be retrieved later. sig { params(repository: ::T.untyped).returns(Relocation::Entry) } - def save_content_loc(repository); end + def save_value_loc(repository); end # Returns the Location represented by `closing_loc`. sig { returns(::T.nilable(Location)) } @@ -13105,9 +13105,9 @@ module Prism sig { returns(::T.nilable(String)) } def opening; end - # Slice the location of content_loc from the source. + # Slice the location of value_loc from the source. sig { returns(String) } - def content; end + def value; end # Slice the location of closing_loc from the source. sig { returns(::T.nilable(String)) } @@ -13913,8 +13913,8 @@ module Prism # ^^^^^ class XStringNode < Node # Initialize a new XStringNode node. - sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String).void } - def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); end + sig { params(source: Source, node_id: Integer, location: Location, flags: Integer, opening_loc: Location, value_loc: Location, closing_loc: Location, unescaped: String).void } + def initialize(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped); end # See Node.accept. sig { override.params(visitor: Visitor).returns(::T.untyped) } @@ -13938,8 +13938,8 @@ module Prism def comment_targets; end # Creates a copy of self with the given fields, using self as the template. - sig { params(node_id: Integer, location: Location, flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String).returns(XStringNode) } - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end + sig { params(node_id: Integer, location: Location, flags: Integer, opening_loc: Location, value_loc: Location, closing_loc: Location, unescaped: String).returns(XStringNode) } + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end sig { override.returns(T::Array[::T.nilable(Node)]) } def deconstruct; end @@ -13975,14 +13975,14 @@ module Prism sig { params(repository: ::T.untyped).returns(Relocation::Entry) } def save_opening_loc(repository); end - # Returns the Location represented by `content_loc`. + # Returns the Location represented by `value_loc`. sig { returns(Location) } - def content_loc; end + def value_loc; end - # Save the content_loc location using the given saved source so that + # Save the value_loc location using the given saved source so that # it can be retrieved later. sig { params(repository: ::T.untyped).returns(Relocation::Entry) } - def save_content_loc(repository); end + def save_value_loc(repository); end # Returns the Location represented by `closing_loc`. sig { returns(Location) } @@ -14001,9 +14001,9 @@ module Prism sig { returns(String) } def opening; end - # Slice the location of content_loc from the source. + # Slice the location of value_loc from the source. sig { returns(String) } - def content; end + def value; end # Slice the location of closing_loc from the source. sig { returns(String) } diff --git a/rbi/generated/prism/node_ext.rbi b/rbi/generated/prism/node_ext.rbi index 589007ddcc..2924127eba 100644 --- a/rbi/generated/prism/node_ext.rbi +++ b/rbi/generated/prism/node_ext.rbi @@ -248,4 +248,36 @@ module Prism sig { returns(::T.nilable(Location)) } def closing_loc; end end + + class MatchLastLineNode < Node + sig { returns(String) } + def content; end + + sig { returns(Location) } + def content_loc; end + end + + class RegularExpressionNode < Node + sig { returns(String) } + def content; end + + sig { returns(Location) } + def content_loc; end + end + + class StringNode < Node + sig { returns(String) } + def content; end + + sig { returns(Location) } + def content_loc; end + end + + class XStringNode < Node + sig { returns(String) } + def content; end + + sig { returns(Location) } + def content_loc; end + end end diff --git a/rust/ruby-prism-sys/src/bindings.rs b/rust/ruby-prism-sys/src/bindings.rs index d6f23a6e27..15380f139f 100644 --- a/rust/ruby-prism-sys/src/bindings.rs +++ b/rust/ruby-prism-sys/src/bindings.rs @@ -7588,9 +7588,9 @@ pub struct pm_match_last_line_node { /** MatchLastLineNode#opening_loc */ pub opening_loc: pm_location_t, - /** MatchLastLineNode#content_loc + /** MatchLastLineNode#value_loc */ - pub content_loc: pm_location_t, + pub value_loc: pm_location_t, /** MatchLastLineNode#closing_loc */ pub closing_loc: pm_location_t, @@ -8720,9 +8720,9 @@ pub struct pm_regular_expression_node { /** RegularExpressionNode#opening_loc */ pub opening_loc: pm_location_t, - /** RegularExpressionNode#content_loc + /** RegularExpressionNode#value_loc */ - pub content_loc: pm_location_t, + pub value_loc: pm_location_t, /** RegularExpressionNode#closing_loc */ pub closing_loc: pm_location_t, @@ -9188,9 +9188,9 @@ pub struct pm_string_node { /** StringNode#opening_loc */ pub opening_loc: pm_location_t, - /** StringNode#content_loc + /** StringNode#value_loc */ - pub content_loc: pm_location_t, + pub value_loc: pm_location_t, /** StringNode#closing_loc */ pub closing_loc: pm_location_t, @@ -9572,9 +9572,9 @@ pub struct pm_x_string_node { /** XStringNode#opening_loc */ pub opening_loc: pm_location_t, - /** XStringNode#content_loc + /** XStringNode#value_loc */ - pub content_loc: pm_location_t, + pub value_loc: pm_location_t, /** XStringNode#closing_loc */ pub closing_loc: pm_location_t, diff --git a/sig/generated/prism/dsl.rbs b/sig/generated/prism/dsl.rbs index c9dabf4fa6..fdfdfd6062 100644 --- a/sig/generated/prism/dsl.rbs +++ b/sig/generated/prism/dsl.rbs @@ -560,8 +560,8 @@ module Prism # Create a new MatchLastLineNode node. # - # : (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode - def match_last_line_node: (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode + # : (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?value_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode + def match_last_line_node: (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?value_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode # Create a new MatchPredicateNode node. # @@ -690,8 +690,8 @@ module Prism # Create a new RegularExpressionNode node. # - # : (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode - def regular_expression_node: (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode + # : (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?value_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode + def regular_expression_node: (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?value_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode # Create a new RequiredKeywordParameterNode node. # @@ -770,8 +770,8 @@ module Prism # Create a new StringNode node. # - # : (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode - def string_node: (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode + # : (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode + def string_node: (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode # Create a new SuperNode node. # @@ -815,8 +815,8 @@ module Prism # Create a new XStringNode node. # - # : (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode - def x_string_node: (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode + # : (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?value_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode + def x_string_node: (?source: Source, ?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?value_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode # Create a new YieldNode node. # diff --git a/sig/generated/prism/node.rbs b/sig/generated/prism/node.rbs index 5026873a89..d1e413033c 100644 --- a/sig/generated/prism/node.rbs +++ b/sig/generated/prism/node.rbs @@ -13924,14 +13924,14 @@ module Prism @closing_loc: Location - @content_loc: Location + @value_loc: Location @opening_loc: Location # Initialize a new MatchLastLineNode node. # - # : (Source source, Integer node_id, Location location, Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped) -> void - def initialize: (Source source, Integer node_id, Location location, Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped) -> void + # : (Source source, Integer node_id, Location location, Integer flags, Location opening_loc, Location value_loc, Location closing_loc, String unescaped) -> void + def initialize: (Source source, Integer node_id, Location location, Integer flags, Location opening_loc, Location value_loc, Location closing_loc, String unescaped) -> void # See Node.accept. # @@ -13965,8 +13965,8 @@ module Prism # # Creates a copy of self with the given fields, using self as the template. # - # : (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode - def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode + # : (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?value_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode + def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?value_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode alias deconstruct child_nodes @@ -14070,19 +14070,19 @@ module Prism # :category: Locations # :call-seq: - # content_loc -> Location + # value_loc -> Location # - # Returns the Location represented by `content_loc`. + # Returns the Location represented by `value_loc`. # # : () -> Location - def content_loc: () -> Location + def value_loc: () -> Location # :category: Repository - # Save the content_loc location using the given saved source so that + # Save the value_loc location using the given saved source so that # it can be retrieved later. # # : (_Repository repository) -> Relocation::Entry - def save_content_loc: (_Repository repository) -> Relocation::Entry + def save_value_loc: (_Repository repository) -> Relocation::Entry # :category: Locations # :call-seq: @@ -14117,12 +14117,12 @@ module Prism def opening: () -> String # :call-seq: - # content -> String + # value -> String # - # Slice the location of content_loc from the source. + # Slice the location of value_loc from the source. # # : () -> String - def content: () -> String + def value: () -> String # :call-seq: # closing -> String @@ -17278,14 +17278,14 @@ module Prism @closing_loc: Location - @content_loc: Location + @value_loc: Location @opening_loc: Location # Initialize a new RegularExpressionNode node. # - # : (Source source, Integer node_id, Location location, Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped) -> void - def initialize: (Source source, Integer node_id, Location location, Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped) -> void + # : (Source source, Integer node_id, Location location, Integer flags, Location opening_loc, Location value_loc, Location closing_loc, String unescaped) -> void + def initialize: (Source source, Integer node_id, Location location, Integer flags, Location opening_loc, Location value_loc, Location closing_loc, String unescaped) -> void # See Node.accept. # @@ -17319,8 +17319,8 @@ module Prism # # Creates a copy of self with the given fields, using self as the template. # - # : (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode - def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode + # : (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?value_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode + def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?value_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode alias deconstruct child_nodes @@ -17424,19 +17424,19 @@ module Prism # :category: Locations # :call-seq: - # content_loc -> Location + # value_loc -> Location # - # Returns the Location represented by `content_loc`. + # Returns the Location represented by `value_loc`. # # : () -> Location - def content_loc: () -> Location + def value_loc: () -> Location # :category: Repository - # Save the content_loc location using the given saved source so that + # Save the value_loc location using the given saved source so that # it can be retrieved later. # # : (_Repository repository) -> Relocation::Entry - def save_content_loc: (_Repository repository) -> Relocation::Entry + def save_value_loc: (_Repository repository) -> Relocation::Entry # :category: Locations # :call-seq: @@ -17471,12 +17471,12 @@ module Prism def opening: () -> String # :call-seq: - # content -> String + # value -> String # - # Slice the location of content_loc from the source. + # Slice the location of value_loc from the source. # # : () -> String - def content: () -> String + def value: () -> String # :call-seq: # closing -> String @@ -19045,14 +19045,14 @@ module Prism @closing_loc: Location? - @content_loc: Location + @value_loc: Location @opening_loc: Location? # Initialize a new StringNode node. # - # : (Source source, Integer node_id, Location location, Integer flags, Location? opening_loc, Location content_loc, Location? closing_loc, String unescaped) -> void - def initialize: (Source source, Integer node_id, Location location, Integer flags, Location? opening_loc, Location content_loc, Location? closing_loc, String unescaped) -> void + # : (Source source, Integer node_id, Location location, Integer flags, Location? opening_loc, Location value_loc, Location? closing_loc, String unescaped) -> void + def initialize: (Source source, Integer node_id, Location location, Integer flags, Location? opening_loc, Location value_loc, Location? closing_loc, String unescaped) -> void # See Node.accept. # @@ -19086,8 +19086,8 @@ module Prism # # Creates a copy of self with the given fields, using self as the template. # - # : (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode - def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode + # : (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode + def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode alias deconstruct child_nodes @@ -19149,19 +19149,19 @@ module Prism # :category: Locations # :call-seq: - # content_loc -> Location + # value_loc -> Location # - # Returns the Location represented by `content_loc`. + # Returns the Location represented by `value_loc`. # # : () -> Location - def content_loc: () -> Location + def value_loc: () -> Location # :category: Repository - # Save the content_loc location using the given saved source so that + # Save the value_loc location using the given saved source so that # it can be retrieved later. # # : (_Repository repository) -> Relocation::Entry - def save_content_loc: (_Repository repository) -> Relocation::Entry + def save_value_loc: (_Repository repository) -> Relocation::Entry # :category: Locations # :call-seq: @@ -19196,12 +19196,12 @@ module Prism def opening: () -> String? # :call-seq: - # content -> String + # value -> String # - # Slice the location of content_loc from the source. + # Slice the location of value_loc from the source. # # : () -> String - def content: () -> String + def value: () -> String # :call-seq: # closing -> String | nil @@ -20432,14 +20432,14 @@ module Prism @closing_loc: Location - @content_loc: Location + @value_loc: Location @opening_loc: Location # Initialize a new XStringNode node. # - # : (Source source, Integer node_id, Location location, Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped) -> void - def initialize: (Source source, Integer node_id, Location location, Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped) -> void + # : (Source source, Integer node_id, Location location, Integer flags, Location opening_loc, Location value_loc, Location closing_loc, String unescaped) -> void + def initialize: (Source source, Integer node_id, Location location, Integer flags, Location opening_loc, Location value_loc, Location closing_loc, String unescaped) -> void # See Node.accept. # @@ -20473,8 +20473,8 @@ module Prism # # Creates a copy of self with the given fields, using self as the template. # - # : (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode - def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode + # : (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?value_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode + def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?value_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode alias deconstruct child_nodes @@ -20524,19 +20524,19 @@ module Prism # :category: Locations # :call-seq: - # content_loc -> Location + # value_loc -> Location # - # Returns the Location represented by `content_loc`. + # Returns the Location represented by `value_loc`. # # : () -> Location - def content_loc: () -> Location + def value_loc: () -> Location # :category: Repository - # Save the content_loc location using the given saved source so that + # Save the value_loc location using the given saved source so that # it can be retrieved later. # # : (_Repository repository) -> Relocation::Entry - def save_content_loc: (_Repository repository) -> Relocation::Entry + def save_value_loc: (_Repository repository) -> Relocation::Entry # :category: Locations # :call-seq: @@ -20571,12 +20571,12 @@ module Prism def opening: () -> String # :call-seq: - # content -> String + # value -> String # - # Slice the location of content_loc from the source. + # Slice the location of value_loc from the source. # # : () -> String - def content: () -> String + def value: () -> String # :call-seq: # closing -> String diff --git a/sig/generated/prism/node_ext.rbs b/sig/generated/prism/node_ext.rbs index b60c8a4d9a..3b36f9785f 100644 --- a/sig/generated/prism/node_ext.rbs +++ b/sig/generated/prism/node_ext.rbs @@ -279,4 +279,36 @@ module Prism # : () -> Location? def closing_loc: () -> Location? end + + class MatchLastLineNode < Node + # : () -> String + def content: () -> String + + # : () -> Location + def content_loc: () -> Location + end + + class RegularExpressionNode < Node + # : () -> String + def content: () -> String + + # : () -> Location + def content_loc: () -> Location + end + + class StringNode < Node + # : () -> String + def content: () -> String + + # : () -> Location + def content_loc: () -> Location + end + + class XStringNode < Node + # : () -> String + def content: () -> String + + # : () -> Location + def content_loc: () -> Location + end end diff --git a/snapshots/3.3-4.0/void_value.txt b/snapshots/3.3-4.0/void_value.txt index 58e1e27b44..cbf4ed8e6f 100644 --- a/snapshots/3.3-4.0/void_value.txt +++ b/snapshots/3.3-4.0/void_value.txt @@ -169,7 +169,7 @@ │ │ │ └── @ StringNode (location: (21,2)-(21,6)) │ │ │ ├── flags: newline │ │ │ ├── opening_loc: (21,2)-(21,3) = "\"" - │ │ │ ├── content_loc: (21,3)-(21,5) = "NG" + │ │ │ ├── value_loc: (21,3)-(21,5) = "NG" │ │ │ ├── closing_loc: (21,5)-(21,6) = "\"" │ │ │ └── unescaped: "NG" │ │ ├── rescue_clause: ∅ @@ -227,7 +227,7 @@ │ │ └── @ StringNode (location: (26,2)-(26,6)) │ │ ├── flags: newline │ │ ├── opening_loc: (26,2)-(26,3) = "\"" - │ │ ├── content_loc: (26,3)-(26,5) = "NG" + │ │ ├── value_loc: (26,3)-(26,5) = "NG" │ │ ├── closing_loc: (26,5)-(26,6) = "\"" │ │ └── unescaped: "NG" │ ├── subsequent: diff --git a/snapshots/4.0/endless_methods_command_call.txt b/snapshots/4.0/endless_methods_command_call.txt index cb819358ef..a22d649deb 100644 --- a/snapshots/4.0/endless_methods_command_call.txt +++ b/snapshots/4.0/endless_methods_command_call.txt @@ -40,7 +40,7 @@ │ │ │ │ └── @ StringNode (location: (1,23)-(1,30)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (1,23)-(1,24) = "\"" - │ │ │ │ ├── content_loc: (1,24)-(1,29) = "Hello" + │ │ │ │ ├── value_loc: (1,24)-(1,29) = "Hello" │ │ │ │ ├── closing_loc: (1,29)-(1,30) = "\"" │ │ │ │ └── unescaped: "Hello" │ │ │ ├── closing_loc: ∅ @@ -91,13 +91,13 @@ │ │ │ │ ├── @ StringNode (location: (2,23)-(2,30)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: (2,23)-(2,24) = "\"" - │ │ │ │ │ ├── content_loc: (2,24)-(2,29) = "Hello" + │ │ │ │ │ ├── value_loc: (2,24)-(2,29) = "Hello" │ │ │ │ │ ├── closing_loc: (2,29)-(2,30) = "\"" │ │ │ │ │ └── unescaped: "Hello" │ │ │ │ └── @ StringNode (location: (2,32)-(2,39)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (2,32)-(2,33) = "\"" - │ │ │ │ ├── content_loc: (2,33)-(2,38) = "World" + │ │ │ │ ├── value_loc: (2,33)-(2,38) = "World" │ │ │ │ ├── closing_loc: (2,38)-(2,39) = "\"" │ │ │ │ └── unescaped: "World" │ │ │ ├── closing_loc: ∅ @@ -148,7 +148,7 @@ │ │ │ │ └── @ StringNode (location: (3,23)-(3,30)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (3,23)-(3,24) = "\"" - │ │ │ │ ├── content_loc: (3,24)-(3,29) = "Hello" + │ │ │ │ ├── value_loc: (3,24)-(3,29) = "Hello" │ │ │ │ ├── closing_loc: (3,29)-(3,30) = "\"" │ │ │ │ └── unescaped: "Hello" │ │ │ ├── closing_loc: ∅ @@ -220,7 +220,7 @@ │ │ │ │ └── @ StringNode (location: (4,25)-(4,32)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (4,25)-(4,26) = "\"" - │ │ │ │ ├── content_loc: (4,26)-(4,31) = "Hello" + │ │ │ │ ├── value_loc: (4,26)-(4,31) = "Hello" │ │ │ │ ├── closing_loc: (4,31)-(4,32) = "\"" │ │ │ │ └── unescaped: "Hello" │ │ │ ├── closing_loc: ∅ @@ -343,7 +343,7 @@ │ │ │ │ └── @ StringNode (location: (6,27)-(6,34)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (6,27)-(6,28) = "\"" - │ │ │ │ ├── content_loc: (6,28)-(6,33) = "Hello" + │ │ │ │ ├── value_loc: (6,28)-(6,33) = "Hello" │ │ │ │ ├── closing_loc: (6,33)-(6,34) = "\"" │ │ │ │ └── unescaped: "Hello" │ │ │ ├── closing_loc: ∅ @@ -405,7 +405,7 @@ │ │ │ │ └── @ StringNode (location: (7,29)-(7,36)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (7,29)-(7,30) = "\"" - │ │ │ │ ├── content_loc: (7,30)-(7,35) = "Hello" + │ │ │ │ ├── value_loc: (7,30)-(7,35) = "Hello" │ │ │ │ ├── closing_loc: (7,35)-(7,36) = "\"" │ │ │ │ └── unescaped: "Hello" │ │ │ ├── closing_loc: ∅ diff --git a/snapshots/4.1/void_value.txt b/snapshots/4.1/void_value.txt index b6ca0253aa..d48021b44d 100644 --- a/snapshots/4.1/void_value.txt +++ b/snapshots/4.1/void_value.txt @@ -37,7 +37,7 @@ │ │ │ └── @ StringNode (location: (4,2)-(4,6)) │ │ │ ├── flags: newline │ │ │ ├── opening_loc: (4,2)-(4,3) = "\"" - │ │ │ ├── content_loc: (4,3)-(4,5) = "OK" + │ │ │ ├── value_loc: (4,3)-(4,5) = "OK" │ │ │ ├── closing_loc: (4,5)-(4,6) = "\"" │ │ │ └── unescaped: "OK" │ │ └── subsequent: ∅ diff --git a/snapshots/alias.txt b/snapshots/alias.txt index 0d52c14f1a..d9fb1af027 100644 --- a/snapshots/alias.txt +++ b/snapshots/alias.txt @@ -66,7 +66,7 @@ │ │ │ ├── @ StringNode (location: (7,8)-(7,11)) │ │ │ │ ├── flags: static_literal, frozen │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (7,8)-(7,11) = "abc" + │ │ │ │ ├── value_loc: (7,8)-(7,11) = "abc" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "abc" │ │ │ └── @ EmbeddedStatementsNode (location: (7,11)-(7,15)) diff --git a/snapshots/arrays.txt b/snapshots/arrays.txt index 62944b80b8..53cd07c4d8 100644 --- a/snapshots/arrays.txt +++ b/snapshots/arrays.txt @@ -867,19 +867,19 @@ │ │ ├── @ StringNode (location: (64,3)-(64,6)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (64,3)-(64,6) = "one" + │ │ │ ├── value_loc: (64,3)-(64,6) = "one" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "one" │ │ ├── @ StringNode (location: (64,7)-(64,10)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (64,7)-(64,10) = "two" + │ │ │ ├── value_loc: (64,7)-(64,10) = "two" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "two" │ │ └── @ StringNode (location: (64,11)-(64,16)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (64,11)-(64,16) = "three" + │ │ ├── value_loc: (64,11)-(64,16) = "three" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "three" │ ├── opening_loc: (64,0)-(64,3) = "%w#" @@ -887,7 +887,7 @@ ├── @ XStringNode (location: (66,0)-(66,17)) │ ├── flags: newline │ ├── opening_loc: (66,0)-(66,3) = "%x#" - │ ├── content_loc: (66,3)-(66,16) = "one two three" + │ ├── value_loc: (66,3)-(66,16) = "one two three" │ ├── closing_loc: (66,16)-(66,17) = "#" │ └── unescaped: "one two three" ├── @ ArrayNode (location: (69,0)-(69,17)) @@ -919,19 +919,19 @@ │ │ ├── @ StringNode (location: (71,3)-(71,6)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (71,3)-(71,6) = "one" + │ │ │ ├── value_loc: (71,3)-(71,6) = "one" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "one" │ │ ├── @ StringNode (location: (71,7)-(71,10)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (71,7)-(71,10) = "two" + │ │ │ ├── value_loc: (71,7)-(71,10) = "two" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "two" │ │ └── @ StringNode (location: (71,11)-(71,16)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (71,11)-(71,16) = "three" + │ │ ├── value_loc: (71,11)-(71,16) = "three" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "three" │ ├── opening_loc: (71,0)-(71,3) = "%w@" @@ -939,7 +939,7 @@ ├── @ XStringNode (location: (73,0)-(73,17)) │ ├── flags: newline │ ├── opening_loc: (73,0)-(73,3) = "%x@" - │ ├── content_loc: (73,3)-(73,16) = "one two three" + │ ├── value_loc: (73,3)-(73,16) = "one two three" │ ├── closing_loc: (73,16)-(73,17) = "@" │ └── unescaped: "one two three" ├── @ ArrayNode (location: (76,0)-(76,17)) @@ -971,19 +971,19 @@ │ │ ├── @ StringNode (location: (78,3)-(78,6)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (78,3)-(78,6) = "one" + │ │ │ ├── value_loc: (78,3)-(78,6) = "one" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "one" │ │ ├── @ StringNode (location: (78,7)-(78,10)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (78,7)-(78,10) = "two" + │ │ │ ├── value_loc: (78,7)-(78,10) = "two" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "two" │ │ └── @ StringNode (location: (78,11)-(78,16)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (78,11)-(78,16) = "three" + │ │ ├── value_loc: (78,11)-(78,16) = "three" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "three" │ ├── opening_loc: (78,0)-(78,3) = "%w{" @@ -991,7 +991,7 @@ ├── @ XStringNode (location: (80,0)-(80,17)) │ ├── flags: newline │ ├── opening_loc: (80,0)-(80,3) = "%x{" - │ ├── content_loc: (80,3)-(80,16) = "one two three" + │ ├── value_loc: (80,3)-(80,16) = "one two three" │ ├── closing_loc: (80,16)-(80,17) = "}" │ └── unescaped: "one two three" ├── @ ArrayNode (location: (82,0)-(82,7)) @@ -1000,7 +1000,7 @@ │ │ └── @ StringNode (location: (82,3)-(82,6)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (82,3)-(82,6) = "\\C:" + │ │ ├── value_loc: (82,3)-(82,6) = "\\C:" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\\C:" │ ├── opening_loc: (82,0)-(82,3) = "%w[" diff --git a/snapshots/begin_rescue.txt b/snapshots/begin_rescue.txt index 7e1ae368a1..b688548208 100644 --- a/snapshots/begin_rescue.txt +++ b/snapshots/begin_rescue.txt @@ -551,7 +551,7 @@ ├── @ StringNode (location: (48,0)-(48,6)) │ ├── flags: newline │ ├── opening_loc: (48,0)-(48,2) = "%!" - │ ├── content_loc: (48,2)-(48,5) = "abc" + │ ├── value_loc: (48,2)-(48,5) = "abc" │ ├── closing_loc: (48,5)-(48,6) = "!" │ └── unescaped: "abc" ├── @ BeginNode (location: (50,0)-(54,3)) diff --git a/snapshots/character_literal.txt b/snapshots/character_literal.txt index 6a591c8b01..ebbf596990 100644 --- a/snapshots/character_literal.txt +++ b/snapshots/character_literal.txt @@ -23,13 +23,13 @@ │ │ ├── @ StringNode (location: (2,2)-(2,9)) │ │ │ ├── flags: static_literal, forced_utf8_encoding, frozen │ │ │ ├── opening_loc: (2,2)-(2,3) = "?" - │ │ │ ├── content_loc: (2,3)-(2,9) = "\\u3042" + │ │ │ ├── value_loc: (2,3)-(2,9) = "\\u3042" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\x{E381}\x82" │ │ └── @ StringNode (location: (2,9)-(2,11)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: (2,9)-(2,10) = "\"" - │ │ ├── content_loc: (2,10)-(2,10) = "" + │ │ ├── value_loc: (2,10)-(2,10) = "" │ │ ├── closing_loc: (2,10)-(2,11) = "\"" │ │ └── unescaped: "" │ └── closing_loc: ∅ diff --git a/snapshots/command_method_call_3.txt b/snapshots/command_method_call_3.txt index e004f875de..35518e6e53 100644 --- a/snapshots/command_method_call_3.txt +++ b/snapshots/command_method_call_3.txt @@ -51,7 +51,7 @@ │ │ │ │ @ StringNode (location: (1,18)-(1,21)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (1,18)-(1,19) = "'" - │ │ │ │ ├── content_loc: (1,19)-(1,20) = "2" + │ │ │ │ ├── value_loc: (1,19)-(1,20) = "2" │ │ │ │ ├── closing_loc: (1,20)-(1,21) = "'" │ │ │ │ └── unescaped: "2" │ │ │ └── operator_loc: (1,15)-(1,17) = "=>" @@ -99,7 +99,7 @@ │ │ │ │ @ StringNode (location: (3,18)-(3,21)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (3,18)-(3,19) = "'" - │ │ │ │ ├── content_loc: (3,19)-(3,20) = "2" + │ │ │ │ ├── value_loc: (3,19)-(3,20) = "2" │ │ │ │ ├── closing_loc: (3,20)-(3,21) = "'" │ │ │ │ └── unescaped: "2" │ │ │ └── operator_loc: (3,15)-(3,17) = "=>" @@ -150,7 +150,7 @@ │ │ │ │ @ StringNode (location: (5,19)-(5,22)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (5,19)-(5,20) = "'" - │ │ │ │ ├── content_loc: (5,20)-(5,21) = "2" + │ │ │ │ ├── value_loc: (5,20)-(5,21) = "2" │ │ │ │ ├── closing_loc: (5,21)-(5,22) = "'" │ │ │ │ └── unescaped: "2" │ │ │ └── operator_loc: (5,16)-(5,18) = "=>" @@ -217,7 +217,7 @@ │ │ │ │ @ StringNode (location: (7,28)-(7,31)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (7,28)-(7,29) = "'" - │ │ │ │ ├── content_loc: (7,29)-(7,30) = "2" + │ │ │ │ ├── value_loc: (7,29)-(7,30) = "2" │ │ │ │ ├── closing_loc: (7,30)-(7,31) = "'" │ │ │ │ └── unescaped: "2" │ │ │ └── operator_loc: (7,25)-(7,27) = "=>" @@ -284,7 +284,7 @@ │ │ │ @ StringNode (location: (9,21)-(9,24)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (9,21)-(9,22) = "'" - │ │ │ ├── content_loc: (9,22)-(9,23) = "2" + │ │ │ ├── value_loc: (9,22)-(9,23) = "2" │ │ │ ├── closing_loc: (9,23)-(9,24) = "'" │ │ │ └── unescaped: "2" │ │ └── operator_loc: (9,18)-(9,20) = "=>" @@ -330,7 +330,7 @@ │ │ │ @ StringNode (location: (11,14)-(11,17)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (11,14)-(11,15) = "'" - │ │ │ ├── content_loc: (11,15)-(11,16) = "2" + │ │ │ ├── value_loc: (11,15)-(11,16) = "2" │ │ │ ├── closing_loc: (11,16)-(11,17) = "'" │ │ │ └── unescaped: "2" │ │ └── operator_loc: (11,11)-(11,13) = "=>" @@ -387,7 +387,7 @@ │ │ │ │ @ StringNode (location: (13,18)-(13,21)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (13,18)-(13,19) = "'" - │ │ │ │ ├── content_loc: (13,19)-(13,20) = "2" + │ │ │ │ ├── value_loc: (13,19)-(13,20) = "2" │ │ │ │ ├── closing_loc: (13,20)-(13,21) = "'" │ │ │ │ └── unescaped: "2" │ │ │ └── operator_loc: (13,15)-(13,17) = "=>" @@ -436,7 +436,7 @@ │ │ │ @ StringNode (location: (15,18)-(15,21)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (15,18)-(15,19) = "'" - │ │ │ ├── content_loc: (15,19)-(15,20) = "2" + │ │ │ ├── value_loc: (15,19)-(15,20) = "2" │ │ │ ├── closing_loc: (15,20)-(15,21) = "'" │ │ │ └── unescaped: "2" │ │ └── operator_loc: (15,15)-(15,17) = "=>" @@ -485,7 +485,7 @@ │ │ │ @ StringNode (location: (17,17)-(17,20)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (17,17)-(17,18) = "'" - │ │ │ ├── content_loc: (17,18)-(17,19) = "2" + │ │ │ ├── value_loc: (17,18)-(17,19) = "2" │ │ │ ├── closing_loc: (17,19)-(17,20) = "'" │ │ │ └── unescaped: "2" │ │ └── operator_loc: (17,14)-(17,16) = "=>" @@ -534,7 +534,7 @@ │ │ @ StringNode (location: (19,21)-(19,24)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (19,21)-(19,22) = "'" - │ │ ├── content_loc: (19,22)-(19,23) = "2" + │ │ ├── value_loc: (19,22)-(19,23) = "2" │ │ ├── closing_loc: (19,23)-(19,24) = "'" │ │ └── unescaped: "2" │ └── operator_loc: (19,18)-(19,20) = "=>" diff --git a/snapshots/dash_heredocs.txt b/snapshots/dash_heredocs.txt index 402aee8b5c..2930e2ec3f 100644 --- a/snapshots/dash_heredocs.txt +++ b/snapshots/dash_heredocs.txt @@ -8,7 +8,7 @@ ├── @ StringNode (location: (1,0)-(1,6)) │ ├── flags: newline │ ├── opening_loc: (1,0)-(1,6) = "<<-EOF" - │ ├── content_loc: (2,0)-(3,0) = " a\n" + │ ├── value_loc: (2,0)-(3,0) = " a\n" │ ├── closing_loc: (3,0)-(4,0) = "EOF\n" │ └── unescaped: " a\n" ├── @ CallNode (location: (5,0)-(5,20)) @@ -17,7 +17,7 @@ │ │ @ StringNode (location: (5,0)-(5,8)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (5,0)-(5,8) = "<<-FIRST" - │ │ ├── content_loc: (6,0)-(7,0) = " a\n" + │ │ ├── value_loc: (6,0)-(7,0) = " a\n" │ │ ├── closing_loc: (7,0)-(8,0) = "FIRST\n" │ │ └── unescaped: " a\n" │ ├── call_operator_loc: ∅ @@ -31,7 +31,7 @@ │ │ └── @ StringNode (location: (5,11)-(5,20)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (5,11)-(5,20) = "<<-SECOND" - │ │ ├── content_loc: (8,0)-(9,0) = " b\n" + │ │ ├── value_loc: (8,0)-(9,0) = " b\n" │ │ ├── closing_loc: (9,0)-(10,0) = "SECOND\n" │ │ └── unescaped: " b\n" │ ├── closing_loc: ∅ @@ -44,7 +44,7 @@ │ │ ├── @ StringNode (location: (12,0)-(13,0)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (12,0)-(13,0) = " a\n" + │ │ │ ├── value_loc: (12,0)-(13,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: " a\n" │ │ ├── @ EmbeddedStatementsNode (location: (13,0)-(13,4)) @@ -69,20 +69,20 @@ │ │ └── @ StringNode (location: (13,4)-(14,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (13,4)-(14,0) = "\n" + │ │ ├── value_loc: (13,4)-(14,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" │ └── closing_loc: (14,0)-(15,0) = "EOF\n" ├── @ StringNode (location: (16,0)-(16,6)) │ ├── flags: newline │ ├── opening_loc: (16,0)-(16,6) = "<<-EOF" - │ ├── content_loc: (17,0)-(18,0) = " a\n" + │ ├── value_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: newline │ ├── opening_loc: (20,0)-(20,6) = "<<-EOF" - │ ├── content_loc: (21,0)-(23,0) = " a\n b\n" + │ ├── value_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)) @@ -92,7 +92,7 @@ │ │ ├── @ StringNode (location: (26,0)-(27,0)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (26,0)-(27,0) = " a\n" + │ │ │ ├── value_loc: (26,0)-(27,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: " a\n" │ │ ├── @ EmbeddedStatementsNode (location: (27,0)-(27,4)) @@ -117,7 +117,7 @@ │ │ └── @ StringNode (location: (27,4)-(28,0)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (27,4)-(28,0) = "\n" + │ │ ├── value_loc: (27,4)-(28,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" │ └── closing_loc: (28,0)-(29,0) = "EOF\n" @@ -128,7 +128,7 @@ │ │ ├── @ StringNode (location: (31,0)-(32,0)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (31,0)-(32,0) = " a\n" + │ │ │ ├── value_loc: (31,0)-(32,0) = " a\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: " a\n" │ │ ├── @ EmbeddedStatementsNode (location: (32,0)-(32,4)) @@ -153,32 +153,32 @@ │ │ └── @ StringNode (location: (32,4)-(33,0)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (32,4)-(33,0) = "\n" + │ │ ├── value_loc: (32,4)-(33,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" │ └── closing_loc: (33,0)-(34,0) = "EOF\n" ├── @ StringNode (location: (35,0)-(35,6)) │ ├── flags: newline │ ├── opening_loc: (35,0)-(35,2) = "%#" - │ ├── content_loc: (35,2)-(35,5) = "abc" + │ ├── value_loc: (35,2)-(35,5) = "abc" │ ├── closing_loc: (35,5)-(35,6) = "#" │ └── unescaped: "abc" ├── @ StringNode (location: (37,0)-(37,6)) │ ├── flags: newline │ ├── opening_loc: (37,0)-(37,6) = "<<-EOF" - │ ├── content_loc: (38,0)-(40,0) = " a\n b\n" + │ ├── value_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: newline │ ├── opening_loc: (42,0)-(42,5) = "<<-''" - │ ├── content_loc: (43,0)-(43,0) = "" + │ ├── value_loc: (43,0)-(43,0) = "" │ ├── closing_loc: (43,0)-(44,0) = "\n" │ └── unescaped: "" ├── @ StringNode (location: (45,0)-(45,8)) │ ├── flags: newline │ ├── opening_loc: (45,0)-(45,8) = "<<-'EOF'" - │ ├── content_loc: (46,0)-(47,0) = " a \#{1}\n" + │ ├── value_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)) @@ -187,7 +187,7 @@ │ │ @ StringNode (location: (49,0)-(49,4)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (49,0)-(49,4) = "<<-A" - │ │ ├── content_loc: (50,0)-(51,0) = " a\n" + │ │ ├── value_loc: (50,0)-(51,0) = " a\n" │ │ ├── closing_loc: (51,0)-(52,0) = "A\n" │ │ └── unescaped: " a\n" │ ├── call_operator_loc: ∅ @@ -205,7 +205,7 @@ │ │ │ ├── @ StringNode (location: (52,0)-(53,2)) │ │ │ │ ├── flags: static_literal, frozen │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (52,0)-(53,2) = " b\n " + │ │ │ │ ├── value_loc: (52,0)-(53,2) = " b\n " │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: " b\n " │ │ │ ├── @ EmbeddedStatementsNode (location: (53,2)-(54,3)) @@ -222,7 +222,7 @@ │ │ │ └── @ StringNode (location: (54,3)-(55,0)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (54,3)-(55,0) = "\n" + │ │ │ ├── value_loc: (54,3)-(55,0) = "\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\n" │ │ └── closing_loc: (55,0)-(56,0) = "B\n" @@ -235,7 +235,7 @@ │ @ StringNode (location: (57,0)-(57,4)) │ ├── flags: ∅ │ ├── opening_loc: (57,0)-(57,4) = "<<-A" - │ ├── content_loc: (58,0)-(59,0) = " a\n" + │ ├── value_loc: (58,0)-(59,0) = " a\n" │ ├── closing_loc: (59,0)-(60,0) = "A\n" │ └── unescaped: " a\n" ├── call_operator_loc: ∅ @@ -253,7 +253,7 @@ │ │ ├── @ StringNode (location: (60,0)-(61,2)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (60,0)-(61,2) = " b\n " + │ │ │ ├── value_loc: (60,0)-(61,2) = " b\n " │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: " b\n " │ │ ├── @ EmbeddedStatementsNode (location: (61,2)-(62,4)) @@ -270,7 +270,7 @@ │ │ └── @ StringNode (location: (62,4)-(63,0)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (62,4)-(63,0) = "\n" + │ │ ├── value_loc: (62,4)-(63,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" │ └── closing_loc: (63,0)-(64,0) = "B\n" diff --git a/snapshots/defined.txt b/snapshots/defined.txt index 650e800a09..266f86fda1 100644 --- a/snapshots/defined.txt +++ b/snapshots/defined.txt @@ -94,7 +94,7 @@ │ │ @ StringNode (location: (9,9)-(9,14)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (9,9)-(9,10) = "\"" - │ │ ├── content_loc: (9,10)-(9,13) = "foo" + │ │ ├── value_loc: (9,10)-(9,13) = "foo" │ │ ├── closing_loc: (9,13)-(9,14) = "\"" │ │ └── unescaped: "foo" │ ├── rparen_loc: (10,0)-(10,1) = ")" diff --git a/snapshots/dos_endings.txt b/snapshots/dos_endings.txt index eaa98f310c..f70247ac64 100644 --- a/snapshots/dos_endings.txt +++ b/snapshots/dos_endings.txt @@ -23,13 +23,13 @@ │ │ │ ├── @ StringNode (location: (1,5)-(1,9)) │ │ │ │ ├── flags: static_literal, frozen │ │ │ │ ├── opening_loc: (1,5)-(1,6) = "\"" - │ │ │ │ ├── content_loc: (1,6)-(1,8) = "hi" + │ │ │ │ ├── value_loc: (1,6)-(1,8) = "hi" │ │ │ │ ├── closing_loc: (1,8)-(1,9) = "\"" │ │ │ │ └── unescaped: "hi" │ │ │ └── @ StringNode (location: (2,5)-(2,12)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: (2,5)-(2,6) = "\"" - │ │ │ ├── content_loc: (2,6)-(2,11) = "there" + │ │ │ ├── value_loc: (2,6)-(2,11) = "there" │ │ │ ├── closing_loc: (2,11)-(2,12) = "\"" │ │ │ └── unescaped: "there" │ │ └── closing_loc: ∅ @@ -50,7 +50,7 @@ ├── @ StringNode (location: (7,0)-(7,4)) │ ├── flags: newline │ ├── opening_loc: (7,0)-(7,4) = "<<-E" - │ ├── content_loc: (8,0)-(11,0) = " 1 \\\r\n 2\r\n 3\r\n" + │ ├── value_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\n 3\n" ├── @ LocalVariableWriteNode (location: (13,0)-(15,0)) @@ -62,7 +62,7 @@ │ │ @ StringNode (location: (13,4)-(15,0)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (13,4)-(14,0) = "%\r\n" - │ │ ├── content_loc: (14,0)-(14,0) = "" + │ │ ├── value_loc: (14,0)-(14,0) = "" │ │ ├── closing_loc: (14,0)-(15,0) = "\r\n" │ │ └── unescaped: "" │ └── operator_loc: (13,2)-(13,3) = "=" @@ -93,13 +93,13 @@ │ │ │ │ ├── @ StringNode (location: (18,0)-(19,0)) │ │ │ │ │ ├── flags: static_literal, frozen │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (18,0)-(19,0) = "\r\n" + │ │ │ │ │ ├── value_loc: (18,0)-(19,0) = "\r\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "\n" │ │ │ │ └── @ StringNode (location: (19,0)-(20,0)) │ │ │ │ ├── flags: static_literal, frozen │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (19,0)-(20,0) = " baz\r\n" + │ │ │ │ ├── value_loc: (19,0)-(20,0) = " baz\r\n" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "baz\n" │ │ │ └── closing_loc: (20,0)-(21,0) = " EOF\r\n" diff --git a/snapshots/dstring.txt b/snapshots/dstring.txt index 516b7b3595..9034e3ff25 100644 --- a/snapshots/dstring.txt +++ b/snapshots/dstring.txt @@ -8,7 +8,7 @@ ├── @ StringNode (location: (1,0)-(2,6)) │ ├── flags: newline │ ├── opening_loc: (1,0)-(1,1) = "\"" - │ ├── content_loc: (1,1)-(2,5) = "foo\n bar" + │ ├── value_loc: (1,1)-(2,5) = "foo\n bar" │ ├── closing_loc: (2,5)-(2,6) = "\"" │ └── unescaped: "foo\n bar" ├── @ InterpolatedStringNode (location: (4,0)-(5,9)) @@ -18,7 +18,7 @@ │ │ ├── @ StringNode (location: (4,1)-(5,2)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (4,1)-(5,2) = "foo\n " + │ │ │ ├── value_loc: (4,1)-(5,2) = "foo\n " │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "foo\n " │ │ └── @ EmbeddedStatementsNode (location: (5,2)-(5,8)) @@ -48,44 +48,44 @@ │ │ ├── @ StringNode (location: (7,0)-(8,2)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: (7,0)-(7,1) = "\"" - │ │ │ ├── content_loc: (7,1)-(8,1) = "fo\no" + │ │ │ ├── value_loc: (7,1)-(8,1) = "fo\no" │ │ │ ├── closing_loc: (8,1)-(8,2) = "\"" │ │ │ └── unescaped: "fo\no" │ │ └── @ StringNode (location: (8,3)-(9,2)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: (8,3)-(8,4) = "\"" - │ │ ├── content_loc: (8,4)-(9,1) = "ba\nr" + │ │ ├── value_loc: (8,4)-(9,1) = "ba\nr" │ │ ├── closing_loc: (9,1)-(9,2) = "\"" │ │ └── unescaped: "ba\nr" │ └── closing_loc: ∅ ├── @ StringNode (location: (11,0)-(13,1)) │ ├── flags: newline │ ├── opening_loc: (11,0)-(11,1) = "\"" - │ ├── content_loc: (11,1)-(13,0) = "\nfoo\\\n" + │ ├── value_loc: (11,1)-(13,0) = "\nfoo\\\n" │ ├── closing_loc: (13,0)-(13,1) = "\"" │ └── unescaped: "\nfoo" ├── @ StringNode (location: (15,0)-(17,1)) │ ├── flags: newline │ ├── opening_loc: (15,0)-(15,1) = "\"" - │ ├── content_loc: (15,1)-(17,0) = "\nfoo\\\\\n" + │ ├── value_loc: (15,1)-(17,0) = "\nfoo\\\\\n" │ ├── closing_loc: (17,0)-(17,1) = "\"" │ └── unescaped: "\nfoo\\\n" ├── @ StringNode (location: (19,0)-(21,1)) │ ├── flags: newline │ ├── opening_loc: (19,0)-(19,1) = "\"" - │ ├── content_loc: (19,1)-(21,0) = "\nfoo\\\\\\\n" + │ ├── value_loc: (19,1)-(21,0) = "\nfoo\\\\\\\n" │ ├── closing_loc: (21,0)-(21,1) = "\"" │ └── unescaped: "\nfoo\\" ├── @ StringNode (location: (23,0)-(25,1)) │ ├── flags: newline │ ├── opening_loc: (23,0)-(23,1) = "\"" - │ ├── content_loc: (23,1)-(25,0) = "\nfoo\\\\\\\\\n" + │ ├── value_loc: (23,1)-(25,0) = "\nfoo\\\\\\\\\n" │ ├── closing_loc: (25,0)-(25,1) = "\"" │ └── unescaped: "\nfoo\\\\\n" ├── @ StringNode (location: (27,0)-(29,1)) │ ├── flags: newline │ ├── opening_loc: (27,0)-(27,1) = "\"" - │ ├── content_loc: (27,1)-(29,0) = "\nfoo\\\\\\\\\\\n" + │ ├── value_loc: (27,1)-(29,0) = "\nfoo\\\\\\\\\\\n" │ ├── closing_loc: (29,0)-(29,1) = "\"" │ └── unescaped: "\nfoo\\\\" ├── @ InterpolatedStringNode (location: (31,0)-(35,1)) @@ -95,7 +95,7 @@ │ │ ├── @ StringNode (location: (31,1)-(34,0)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (31,1)-(34,0) = "\nfoo\\\nb\\nar\n" + │ │ │ ├── value_loc: (31,1)-(34,0) = "\nfoo\\\nb\\nar\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\nfoob\nar\n" │ │ ├── @ EmbeddedStatementsNode (location: (34,0)-(34,3)) @@ -106,7 +106,7 @@ │ │ └── @ StringNode (location: (34,3)-(35,0)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (34,3)-(35,0) = "\n" + │ │ ├── value_loc: (34,3)-(35,0) = "\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n" │ └── closing_loc: (35,0)-(35,1) = "\"" @@ -117,7 +117,7 @@ │ │ ├── @ StringNode (location: (37,1)-(38,2)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (37,1)-(38,2) = "foo\n\\n" + │ │ │ ├── value_loc: (37,1)-(38,2) = "foo\n\\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "foo\n\n" │ │ ├── @ EmbeddedStatementsNode (location: (38,2)-(38,5)) @@ -128,7 +128,7 @@ │ │ ├── @ StringNode (location: (38,5)-(38,12)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (38,5)-(38,12) = "bar\\n\\n" + │ │ │ ├── value_loc: (38,5)-(38,12) = "bar\\n\\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "bar\n\n" │ │ ├── @ EmbeddedStatementsNode (location: (38,12)-(38,15)) @@ -139,7 +139,7 @@ │ │ ├── @ StringNode (location: (38,15)-(39,6)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (38,15)-(39,6) = "\na\\nb\\n" + │ │ │ ├── value_loc: (38,15)-(39,6) = "\na\\nb\\n" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "\na\nb\n" │ │ ├── @ EmbeddedStatementsNode (location: (39,6)-(39,9)) @@ -150,13 +150,13 @@ │ │ └── @ StringNode (location: (39,9)-(39,14)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (39,9)-(39,14) = "\\nc\\n" + │ │ ├── value_loc: (39,9)-(39,14) = "\\nc\\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\nc\n" │ └── closing_loc: (39,14)-(39,15) = "\"" └── @ StringNode (location: (41,0)-(42,4)) ├── flags: newline ├── opening_loc: (41,0)-(41,1) = "\"" - ├── content_loc: (41,1)-(42,3) = "\n’" + ├── value_loc: (41,1)-(42,3) = "\n’" ├── closing_loc: (42,3)-(42,4) = "\"" └── unescaped: "\n’" diff --git a/snapshots/encoding_binary.txt b/snapshots/encoding_binary.txt index ad5449c1f1..26dde856bf 100644 --- a/snapshots/encoding_binary.txt +++ b/snapshots/encoding_binary.txt @@ -8,7 +8,7 @@ ├── @ StringNode (location: (3,0)-(3,6)) │ ├── flags: newline │ ├── opening_loc: (3,0)-(3,1) = "\"" - │ ├── content_loc: (3,1)-(3,5) = "\\xcd" + │ ├── value_loc: (3,1)-(3,5) = "\\xcd" │ ├── closing_loc: (3,5)-(3,6) = "\"" │ └── unescaped: "\xCD" ├── @ SymbolNode (location: (5,0)-(5,7)) @@ -31,7 +31,7 @@ │ │ │ └── @ StringNode (location: (7,3)-(7,9)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: (7,3)-(7,4) = "\"" - │ │ │ ├── content_loc: (7,4)-(7,8) = "\\xcd" + │ │ │ ├── value_loc: (7,4)-(7,8) = "\\xcd" │ │ │ ├── closing_loc: (7,8)-(7,9) = "\"" │ │ │ └── unescaped: "\xCD" │ │ └── closing_loc: (7,9)-(7,10) = "}" @@ -42,7 +42,7 @@ │ └── @ StringNode (location: (9,3)-(9,7)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (9,3)-(9,7) = "\\xC0" + │ ├── value_loc: (9,3)-(9,7) = "\\xC0" │ ├── closing_loc: ∅ │ └── unescaped: "\xC0" ├── opening_loc: (9,0)-(9,3) = "%W[" diff --git a/snapshots/encoding_euc_jp.txt b/snapshots/encoding_euc_jp.txt index 934a1fdb7e..d2ed3917e7 100644 --- a/snapshots/encoding_euc_jp.txt +++ b/snapshots/encoding_euc_jp.txt @@ -8,7 +8,7 @@ ├── @ StringNode (location: (4,0)-(4,10)) │ ├── flags: newline │ ├── opening_loc: (4,0)-(4,1) = "\"" - │ ├── content_loc: (4,1)-(4,9) = "\\x8E\\x01" + │ ├── value_loc: (4,1)-(4,9) = "\\x8E\\x01" │ ├── closing_loc: (4,9)-(4,10) = "\"" │ └── unescaped: "\x8E\x01" └── @ ArrayNode (location: (6,0)-(6,14)) @@ -17,7 +17,7 @@ │ └── @ StringNode (location: (6,3)-(6,13)) │ ├── flags: ∅ │ ├── opening_loc: ∅ - │ ├── content_loc: (6,3)-(6,13) = "\"\\x8E\\x01\"" + │ ├── value_loc: (6,3)-(6,13) = "\"\\x8E\\x01\"" │ ├── closing_loc: ∅ │ └── unescaped: "\"\x8E\x01\"" ├── opening_loc: (6,0)-(6,3) = "%W[" diff --git a/snapshots/endless_methods.txt b/snapshots/endless_methods.txt index 9334abec63..1bad6fe192 100644 --- a/snapshots/endless_methods.txt +++ b/snapshots/endless_methods.txt @@ -49,7 +49,7 @@ │ │ │ └── @ StringNode (location: (3,12)-(3,14)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (3,12)-(3,13) = "\"" - │ │ │ ├── content_loc: (3,13)-(3,13) = "" + │ │ │ ├── value_loc: (3,13)-(3,13) = "" │ │ │ ├── closing_loc: (3,13)-(3,14) = "\"" │ │ │ └── unescaped: "" │ │ ├── closing_loc: ∅ diff --git a/snapshots/escaped_newline_with_trailing_content.txt b/snapshots/escaped_newline_with_trailing_content.txt index 44d373570b..902950fae9 100644 --- a/snapshots/escaped_newline_with_trailing_content.txt +++ b/snapshots/escaped_newline_with_trailing_content.txt @@ -8,6 +8,6 @@ └── @ StringNode (location: (1,0)-(2,6)) ├── flags: newline ├── opening_loc: (1,0)-(1,1) = "\"" - ├── content_loc: (1,1)-(2,5) = "A\nB\\nCC" + ├── value_loc: (1,1)-(2,5) = "A\nB\\nCC" ├── closing_loc: (2,5)-(2,6) = "\"" └── unescaped: "A\nB\nCC" diff --git a/snapshots/heredoc.txt b/snapshots/heredoc.txt index 7145f0f752..cc3c9cac7e 100644 --- a/snapshots/heredoc.txt +++ b/snapshots/heredoc.txt @@ -8,6 +8,6 @@ └── @ StringNode (location: (1,0)-(1,6)) ├── flags: newline ├── opening_loc: (1,0)-(1,6) = "<bar)" │ │ │ │ ├── call_operator_loc: ∅ @@ -142,31 +142,31 @@ ├── @ RegularExpressionNode (location: (13,0)-(13,6)) │ ├── flags: newline, static_literal, ignore_case, forced_us_ascii_encoding │ ├── opening_loc: (13,0)-(13,1) = "/" - │ ├── content_loc: (13,1)-(13,4) = "abc" + │ ├── value_loc: (13,1)-(13,4) = "abc" │ ├── closing_loc: (13,4)-(13,6) = "/i" │ └── unescaped: "abc" ├── @ RegularExpressionNode (location: (15,0)-(15,26)) │ ├── flags: newline, static_literal, ignore_case, forced_us_ascii_encoding │ ├── opening_loc: (15,0)-(15,3) = "%r/" - │ ├── content_loc: (15,3)-(15,24) = "[a-z$._?][\\w$.?\#@~]*:" + │ ├── value_loc: (15,3)-(15,24) = "[a-z$._?][\\w$.?\#@~]*:" │ ├── closing_loc: (15,24)-(15,26) = "/i" │ └── unescaped: "[a-z$._?][\\w$.?\#@~]*:" ├── @ RegularExpressionNode (location: (17,0)-(17,37)) │ ├── flags: newline, static_literal, ignore_case, forced_us_ascii_encoding │ ├── opening_loc: (17,0)-(17,3) = "%r/" - │ ├── content_loc: (17,3)-(17,35) = "([a-z$._?][\\w$.?\#@~]*)(\\s+)(equ)" + │ ├── value_loc: (17,3)-(17,35) = "([a-z$._?][\\w$.?\#@~]*)(\\s+)(equ)" │ ├── closing_loc: (17,35)-(17,37) = "/i" │ └── unescaped: "([a-z$._?][\\w$.?\#@~]*)(\\s+)(equ)" ├── @ RegularExpressionNode (location: (19,0)-(19,25)) │ ├── flags: newline, static_literal, ignore_case, forced_us_ascii_encoding │ ├── opening_loc: (19,0)-(19,3) = "%r/" - │ ├── content_loc: (19,3)-(19,23) = "[a-z$._?][\\w$.?\#@~]*" + │ ├── value_loc: (19,3)-(19,23) = "[a-z$._?][\\w$.?\#@~]*" │ ├── closing_loc: (19,23)-(19,25) = "/i" │ └── unescaped: "[a-z$._?][\\w$.?\#@~]*" ├── @ RegularExpressionNode (location: (21,0)-(24,1)) │ ├── flags: newline, static_literal, forced_us_ascii_encoding │ ├── opening_loc: (21,0)-(21,3) = "%r(" - │ ├── content_loc: (21,3)-(24,0) = "\n(?:[\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\#$%_']+)\n" + │ ├── value_loc: (21,3)-(24,0) = "\n(?:[\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\#$%_']+)\n" │ ├── closing_loc: (24,0)-(24,1) = ")" │ └── unescaped: "\n(?:[\#$%_']|\\(\\)|\\(,\\)|\\[\\]|[0-9])*\n (?:[\#$%_']+)\n" ├── @ CallNode (location: (26,0)-(26,16)) @@ -175,7 +175,7 @@ │ │ @ RegularExpressionNode (location: (26,0)-(26,8)) │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ ├── opening_loc: (26,0)-(26,1) = "/" - │ │ ├── content_loc: (26,1)-(26,7) = "(?#\\))" + │ │ ├── value_loc: (26,1)-(26,7) = "(?#\\))" │ │ ├── closing_loc: (26,7)-(26,8) = "/" │ │ └── unescaped: "(?#\\))" │ ├── call_operator_loc: ∅ @@ -189,7 +189,7 @@ │ │ └── @ StringNode (location: (26,12)-(26,16)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (26,12)-(26,13) = "\"" - │ │ ├── content_loc: (26,13)-(26,15) = "hi" + │ │ ├── value_loc: (26,13)-(26,15) = "hi" │ │ ├── closing_loc: (26,15)-(26,16) = "\"" │ │ └── unescaped: "hi" │ ├── closing_loc: ∅ @@ -198,7 +198,7 @@ ├── @ RegularExpressionNode (location: (28,0)-(28,9)) │ ├── flags: newline, static_literal, forced_us_ascii_encoding │ ├── opening_loc: (28,0)-(28,3) = "%r#" - │ ├── content_loc: (28,3)-(28,8) = "pound" + │ ├── value_loc: (28,3)-(28,8) = "pound" │ ├── closing_loc: (28,8)-(28,9) = "#" │ └── unescaped: "pound" ├── @ InterpolatedRegularExpressionNode (location: (30,0)-(30,13)) @@ -208,7 +208,7 @@ │ │ ├── @ StringNode (location: (30,1)-(30,5)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (30,1)-(30,5) = "aaa " + │ │ │ ├── value_loc: (30,1)-(30,5) = "aaa " │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "aaa " │ │ └── @ EmbeddedStatementsNode (location: (30,5)-(30,11)) @@ -240,7 +240,7 @@ │ │ │ @ RegularExpressionNode (location: (32,0)-(33,4)) │ │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ │ ├── opening_loc: (32,0)-(32,1) = "/" - │ │ │ ├── content_loc: (32,1)-(33,3) = "(?)" + │ │ │ ├── value_loc: (32,1)-(33,3) = "(?)" │ │ │ ├── closing_loc: (33,3)-(33,4) = "/" │ │ │ └── unescaped: "(?)" │ │ ├── call_operator_loc: ∅ @@ -254,7 +254,7 @@ │ │ │ └── @ StringNode (location: (33,8)-(33,10)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (33,8)-(33,9) = "\"" - │ │ │ ├── content_loc: (33,9)-(33,9) = "" + │ │ │ ├── value_loc: (33,9)-(33,9) = "" │ │ │ ├── closing_loc: (33,9)-(33,10) = "\"" │ │ │ └── unescaped: "" │ │ ├── closing_loc: ∅ @@ -278,7 +278,7 @@ │ │ │ @ RegularExpressionNode (location: (35,0)-(35,18)) │ │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ │ ├── opening_loc: (35,0)-(35,1) = "/" - │ │ │ ├── content_loc: (35,1)-(35,17) = "(?)(?)" + │ │ │ ├── value_loc: (35,1)-(35,17) = "(?)(?)" │ │ │ ├── closing_loc: (35,17)-(35,18) = "/" │ │ │ └── unescaped: "(?)(?)" │ │ ├── call_operator_loc: ∅ @@ -292,7 +292,7 @@ │ │ │ └── @ StringNode (location: (35,22)-(35,24)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (35,22)-(35,23) = "\"" - │ │ │ ├── content_loc: (35,23)-(35,23) = "" + │ │ │ ├── value_loc: (35,23)-(35,23) = "" │ │ │ ├── closing_loc: (35,23)-(35,24) = "\"" │ │ │ └── unescaped: "" │ │ ├── closing_loc: ∅ @@ -313,7 +313,7 @@ │ │ @ RegularExpressionNode (location: (37,0)-(37,10)) │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ ├── opening_loc: (37,0)-(37,1) = "/" - │ │ ├── content_loc: (37,1)-(37,9) = "(?)" + │ │ ├── value_loc: (37,1)-(37,9) = "(?)" │ │ ├── closing_loc: (37,9)-(37,10) = "/" │ │ └── unescaped: "(?)" │ ├── call_operator_loc: ∅ @@ -327,7 +327,7 @@ │ │ └── @ StringNode (location: (37,14)-(37,16)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (37,14)-(37,15) = "\"" - │ │ ├── content_loc: (37,15)-(37,15) = "" + │ │ ├── value_loc: (37,15)-(37,15) = "" │ │ ├── closing_loc: (37,15)-(37,16) = "\"" │ │ └── unescaped: "" │ ├── closing_loc: ∅ @@ -371,7 +371,7 @@ │ │ │ │ @ RegularExpressionNode (location: (40,6)-(40,14)) │ │ │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ │ │ ├── opening_loc: (40,6)-(40,7) = "/" - │ │ │ │ ├── content_loc: (40,7)-(40,13) = "(?)" + │ │ │ │ ├── value_loc: (40,7)-(40,13) = "(?)" │ │ │ │ ├── closing_loc: (40,13)-(40,14) = "/" │ │ │ │ └── unescaped: "(?)" │ │ │ ├── call_operator_loc: ∅ @@ -412,7 +412,7 @@ │ │ │ @ RegularExpressionNode (location: (42,0)-(42,10)) │ │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ │ ├── opening_loc: (42,0)-(42,1) = "/" - │ │ │ ├── content_loc: (42,1)-(42,9) = "(?)" + │ │ │ ├── value_loc: (42,1)-(42,9) = "(?)" │ │ │ ├── closing_loc: (42,9)-(42,10) = "/" │ │ │ └── unescaped: "(?)" │ │ ├── call_operator_loc: ∅ @@ -426,7 +426,7 @@ │ │ │ └── @ StringNode (location: (42,14)-(42,16)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (42,14)-(42,15) = "\"" - │ │ │ ├── content_loc: (42,15)-(42,15) = "" + │ │ │ ├── value_loc: (42,15)-(42,15) = "" │ │ │ ├── closing_loc: (42,15)-(42,16) = "\"" │ │ │ └── unescaped: "" │ │ ├── closing_loc: ∅ @@ -443,7 +443,7 @@ │ │ @ RegularExpressionNode (location: (43,0)-(43,10)) │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ ├── opening_loc: (43,0)-(43,1) = "/" - │ │ ├── content_loc: (43,1)-(43,9) = "(?)" + │ │ ├── value_loc: (43,1)-(43,9) = "(?)" │ │ ├── closing_loc: (43,9)-(43,10) = "/" │ │ └── unescaped: "(?)" │ ├── call_operator_loc: ∅ @@ -457,7 +457,7 @@ │ │ └── @ StringNode (location: (43,14)-(43,16)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (43,14)-(43,15) = "\"" - │ │ ├── content_loc: (43,15)-(43,15) = "" + │ │ ├── value_loc: (43,15)-(43,15) = "" │ │ ├── closing_loc: (43,15)-(43,16) = "\"" │ │ └── unescaped: "" │ ├── closing_loc: ∅ @@ -469,7 +469,7 @@ │ │ @ RegularExpressionNode (location: (45,0)-(45,10)) │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ ├── opening_loc: (45,0)-(45,1) = "/" - │ │ ├── content_loc: (45,1)-(45,9) = "(?)" + │ │ ├── value_loc: (45,1)-(45,9) = "(?)" │ │ ├── closing_loc: (45,9)-(45,10) = "/" │ │ └── unescaped: "(?)" │ ├── call_operator_loc: ∅ @@ -483,7 +483,7 @@ │ │ └── @ StringNode (location: (45,14)-(45,16)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (45,14)-(45,15) = "\"" - │ │ ├── content_loc: (45,15)-(45,15) = "" + │ │ ├── value_loc: (45,15)-(45,15) = "" │ │ ├── closing_loc: (45,15)-(45,16) = "\"" │ │ └── unescaped: "" │ ├── closing_loc: ∅ @@ -521,7 +521,7 @@ │ │ │ │ @ RegularExpressionNode (location: (46,16)-(46,26)) │ │ │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ │ │ ├── opening_loc: (46,16)-(46,17) = "/" - │ │ │ │ ├── content_loc: (46,17)-(46,25) = "(?)" + │ │ │ │ ├── value_loc: (46,17)-(46,25) = "(?)" │ │ │ │ ├── closing_loc: (46,25)-(46,26) = "/" │ │ │ │ └── unescaped: "(?)" │ │ │ ├── call_operator_loc: ∅ @@ -535,7 +535,7 @@ │ │ │ │ └── @ StringNode (location: (46,30)-(46,32)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (46,30)-(46,31) = "\"" - │ │ │ │ ├── content_loc: (46,31)-(46,31) = "" + │ │ │ │ ├── value_loc: (46,31)-(46,31) = "" │ │ │ │ ├── closing_loc: (46,31)-(46,32) = "\"" │ │ │ │ └── unescaped: "" │ │ │ ├── closing_loc: ∅ @@ -556,18 +556,18 @@ ├── @ RegularExpressionNode (location: (48,0)-(48,10)) │ ├── flags: newline, static_literal, extended, forced_us_ascii_encoding │ ├── opening_loc: (48,0)-(48,1) = "/" - │ ├── content_loc: (48,1)-(48,8) = "(?-x:#)" + │ ├── value_loc: (48,1)-(48,8) = "(?-x:#)" │ ├── closing_loc: (48,8)-(48,10) = "/x" │ └── unescaped: "(?-x:#)" ├── @ RegularExpressionNode (location: (50,0)-(56,1)) │ ├── flags: newline, static_literal, forced_us_ascii_encoding │ ├── opening_loc: (50,0)-(50,1) = "/" - │ ├── content_loc: (50,1)-(56,0) = "a\nb\\\nc\\\nd\\\\\\\ne\\\\\nf\\\n" + │ ├── value_loc: (50,1)-(56,0) = "a\nb\\\nc\\\nd\\\\\\\ne\\\\\nf\\\n" │ ├── closing_loc: (56,0)-(56,1) = "/" │ └── unescaped: "a\nbcd\\\\e\\\\\nf" └── @ RegularExpressionNode (location: (58,0)-(58,2)) ├── flags: newline, static_literal, forced_us_ascii_encoding ├── opening_loc: (58,0)-(58,1) = "/" - ├── content_loc: (58,1)-(58,1) = "" + ├── value_loc: (58,1)-(58,1) = "" ├── closing_loc: (58,1)-(58,2) = "/" └── unescaped: "" diff --git a/snapshots/regex_char_width.txt b/snapshots/regex_char_width.txt index d08fe8dda7..20139c1942 100644 --- a/snapshots/regex_char_width.txt +++ b/snapshots/regex_char_width.txt @@ -14,7 +14,7 @@ │ │ │ @ RegularExpressionNode (location: (2,0)-(2,22)) │ │ │ ├── flags: static_literal │ │ │ ├── opening_loc: (2,0)-(2,1) = "/" - │ │ │ ├── content_loc: (2,1)-(2,21) = "\x{E285}\xA7(?.)\x{E285}\xA9(?.)" + │ │ │ ├── value_loc: (2,1)-(2,21) = "\x{E285}\xA7(?.)\x{E285}\xA9(?.)" │ │ │ ├── closing_loc: (2,21)-(2,22) = "/" │ │ │ └── unescaped: "\x{E285}\xA7(?.)\x{E285}\xA9(?.)" │ │ ├── call_operator_loc: ∅ @@ -28,7 +28,7 @@ │ │ │ └── @ StringNode (location: (2,26)-(2,36)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (2,26)-(2,27) = "'" - │ │ │ ├── content_loc: (2,27)-(2,35) = "\x{E285}\xA7a\x{E285}\xA9b" + │ │ │ ├── value_loc: (2,27)-(2,35) = "\x{E285}\xA7a\x{E285}\xA9b" │ │ │ ├── closing_loc: (2,35)-(2,36) = "'" │ │ │ └── unescaped: "\x{E285}\xA7a\x{E285}\xA9b" │ │ ├── closing_loc: ∅ diff --git a/snapshots/regex_escape_encoding.txt b/snapshots/regex_escape_encoding.txt index ee073c6c58..350d029779 100644 --- a/snapshots/regex_escape_encoding.txt +++ b/snapshots/regex_escape_encoding.txt @@ -14,7 +14,7 @@ │ │ @ StringNode (location: (2,6)-(2,18)) │ │ ├── flags: forced_binary_encoding │ │ ├── opening_loc: (2,6)-(2,7) = "\"" - │ │ ├── content_loc: (2,7)-(2,17) = "hello \\xFC" + │ │ ├── value_loc: (2,7)-(2,17) = "hello \\xFC" │ │ ├── closing_loc: (2,17)-(2,18) = "\"" │ │ └── unescaped: "hello \xFC" │ └── operator_loc: (2,4)-(2,5) = "=" @@ -36,7 +36,7 @@ │ └── @ RegularExpressionNode (location: (3,7)-(3,21)) │ ├── flags: static_literal, forced_utf8_encoding │ ├── opening_loc: (3,7)-(3,8) = "/" - │ ├── content_loc: (3,8)-(3,20) = "hello \\u{fc}" + │ ├── value_loc: (3,8)-(3,20) = "hello \\u{fc}" │ ├── closing_loc: (3,20)-(3,21) = "/" │ └── unescaped: "hello \\u{fc}" ├── closing_loc: ∅ diff --git a/snapshots/regex_with_fake_newlines.txt b/snapshots/regex_with_fake_newlines.txt index 5f7d9ef85d..ee50094cba 100644 --- a/snapshots/regex_with_fake_newlines.txt +++ b/snapshots/regex_with_fake_newlines.txt @@ -8,13 +8,13 @@ ├── @ RegularExpressionNode (location: (1,0)-(13,1)) │ ├── flags: newline, static_literal, forced_us_ascii_encoding │ ├── opening_loc: (1,0)-(1,1) = "/" - │ ├── content_loc: (1,1)-(13,0) = "\n \\n\n \\n\n exit\n \\\\n\n \\n\\n\\n\\n\n argh\n \\\\\n \\\\\\\n foo\\nbar\n \\f\n ok\n" + │ ├── value_loc: (1,1)-(13,0) = "\n \\n\n \\n\n exit\n \\\\n\n \\n\\n\\n\\n\n argh\n \\\\\n \\\\\\\n foo\\nbar\n \\f\n ok\n" │ ├── closing_loc: (13,0)-(13,1) = "/" │ └── unescaped: "\n \\n\n \\n\n exit\n \\\\n\n \\n\\n\\n\\n\n argh\n \\\\\n \\\\ foo\\nbar\n \\f\n ok\n" ├── @ RegularExpressionNode (location: (15,0)-(27,1)) │ ├── flags: newline, static_literal, forced_us_ascii_encoding │ ├── opening_loc: (15,0)-(15,3) = "%r{" - │ ├── content_loc: (15,3)-(27,0) = "\n \\n\n \\n\n exit\n \\\\n\n \\n\\n\\n\\n\n argh\n \\\\\n \\\\\\\n foo\\nbar\n \\f\n ok\n" + │ ├── value_loc: (15,3)-(27,0) = "\n \\n\n \\n\n exit\n \\\\n\n \\n\\n\\n\\n\n argh\n \\\\\n \\\\\\\n foo\\nbar\n \\f\n ok\n" │ ├── closing_loc: (27,0)-(27,1) = "}" │ └── unescaped: "\n \\n\n \\n\n exit\n \\\\n\n \\n\\n\\n\\n\n argh\n \\\\\n \\\\ foo\\nbar\n \\f\n ok\n" └── @ InterpolatedRegularExpressionNode (location: (29,0)-(41,1)) @@ -24,7 +24,7 @@ │ ├── @ StringNode (location: (29,3)-(30,2)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (29,3)-(30,2) = "\n " + │ │ ├── value_loc: (29,3)-(30,2) = "\n " │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\n " │ ├── @ EmbeddedStatementsNode (location: (30,2)-(30,8)) @@ -41,7 +41,7 @@ │ ├── @ StringNode (location: (30,8)-(33,4)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (30,8)-(33,4) = "\\n\n \\n\n exit\\\\\\\n \\\\" + │ │ ├── value_loc: (30,8)-(33,4) = "\\n\n \\n\n exit\\\\\\\n \\\\" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\\n\n \\n\n exit\\\\ \\\\" │ ├── @ EmbeddedStatementsNode (location: (33,4)-(33,10)) @@ -58,7 +58,7 @@ │ ├── @ StringNode (location: (33,10)-(34,4)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (33,10)-(34,4) = "n\n \\n" + │ │ ├── value_loc: (33,10)-(34,4) = "n\n \\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "n\n \\n" │ ├── @ EmbeddedStatementsNode (location: (34,4)-(34,10)) @@ -75,7 +75,7 @@ │ ├── @ StringNode (location: (34,10)-(36,4)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (34,10)-(36,4) = "\\n\\n\\n\n argh\\\n \\\\" + │ │ ├── value_loc: (34,10)-(36,4) = "\\n\\n\\n\n argh\\\n \\\\" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "\\n\\n\\n\n argh \\\\" │ ├── @ EmbeddedStatementsNode (location: (36,4)-(36,10)) @@ -92,7 +92,7 @@ │ └── @ StringNode (location: (36,10)-(41,0)) │ ├── flags: static_literal, frozen │ ├── opening_loc: ∅ - │ ├── content_loc: (36,10)-(41,0) = "baz\\\\\n \\\\\\\n foo\\nbar\n \\f\n ok\n" + │ ├── value_loc: (36,10)-(41,0) = "baz\\\\\n \\\\\\\n foo\\nbar\n \\f\n ok\n" │ ├── closing_loc: ∅ │ └── unescaped: "baz\\\\\n \\\\ foo\\nbar\n \\f\n ok\n" └── closing_loc: (41,0)-(41,1) = "}" diff --git a/snapshots/rescue.txt b/snapshots/rescue.txt index 0ee20ee218..5cc9435c5d 100644 --- a/snapshots/rescue.txt +++ b/snapshots/rescue.txt @@ -323,7 +323,7 @@ │ │ │ │ └── @ StringNode (location: (19,35)-(19,40)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (19,35)-(19,36) = "\"" - │ │ │ │ ├── content_loc: (19,36)-(19,39) = "baz" + │ │ │ │ ├── value_loc: (19,36)-(19,39) = "baz" │ │ │ │ ├── closing_loc: (19,39)-(19,40) = "\"" │ │ │ │ └── unescaped: "baz" │ │ │ ├── closing_loc: ∅ diff --git a/snapshots/seattlerb/TestRubyParserShared.txt b/snapshots/seattlerb/TestRubyParserShared.txt index 548b112dde..2dfe798bed 100644 --- a/snapshots/seattlerb/TestRubyParserShared.txt +++ b/snapshots/seattlerb/TestRubyParserShared.txt @@ -38,13 +38,13 @@ │ │ ├── @ StringNode (location: (17,0)-(17,5)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (17,0)-(17,5) = "line2" + │ │ │ ├── value_loc: (17,0)-(17,5) = "line2" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "line2" │ │ └── @ StringNode (location: (18,0)-(18,5)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (18,0)-(18,5) = "line3" + │ │ ├── value_loc: (18,0)-(18,5) = "line3" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "line3" │ ├── opening_loc: (16,0)-(16,3) = "%W[" @@ -74,7 +74,7 @@ ├── @ RegularExpressionNode (location: (31,0)-(34,1)) │ ├── flags: newline, static_literal, forced_us_ascii_encoding │ ├── opening_loc: (31,0)-(31,3) = "%r[" - │ ├── content_loc: (31,3)-(34,0) = "\n\n\n" + │ ├── value_loc: (31,3)-(34,0) = "\n\n\n" │ ├── closing_loc: (34,0)-(34,1) = "]" │ └── unescaped: "\n\n\n" ├── @ ArrayNode (location: (36,0)-(39,1)) @@ -88,13 +88,13 @@ │ │ ├── @ StringNode (location: (42,0)-(42,5)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (42,0)-(42,5) = "line2" + │ │ │ ├── value_loc: (42,0)-(42,5) = "line2" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "line2" │ │ └── @ StringNode (location: (43,0)-(43,5)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (43,0)-(43,5) = "line3" + │ │ ├── value_loc: (43,0)-(43,5) = "line3" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "line3" │ ├── opening_loc: (41,0)-(41,3) = "%w[" diff --git a/snapshots/seattlerb/array_line_breaks.txt b/snapshots/seattlerb/array_line_breaks.txt index a2d21e90ad..21fc0f314d 100644 --- a/snapshots/seattlerb/array_line_breaks.txt +++ b/snapshots/seattlerb/array_line_breaks.txt @@ -11,13 +11,13 @@ │ │ ├── @ StringNode (location: (2,0)-(2,3)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (2,0)-(2,1) = "'" - │ │ │ ├── content_loc: (2,1)-(2,2) = "a" + │ │ │ ├── value_loc: (2,1)-(2,2) = "a" │ │ │ ├── closing_loc: (2,2)-(2,3) = "'" │ │ │ └── unescaped: "a" │ │ └── @ StringNode (location: (3,0)-(3,3)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (3,0)-(3,1) = "'" - │ │ ├── content_loc: (3,1)-(3,2) = "b" + │ │ ├── value_loc: (3,1)-(3,2) = "b" │ │ ├── closing_loc: (3,2)-(3,3) = "'" │ │ └── unescaped: "b" │ ├── opening_loc: (1,0)-(1,1) = "[" diff --git a/snapshots/seattlerb/attrasgn_array_lhs.txt b/snapshots/seattlerb/attrasgn_array_lhs.txt index 1cc64d3e07..4578d05d4f 100644 --- a/snapshots/seattlerb/attrasgn_array_lhs.txt +++ b/snapshots/seattlerb/attrasgn_array_lhs.txt @@ -66,19 +66,19 @@ │ │ ├── @ StringNode (location: (1,28)-(1,31)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (1,28)-(1,29) = "\"" - │ │ │ ├── content_loc: (1,29)-(1,30) = "a" + │ │ │ ├── value_loc: (1,29)-(1,30) = "a" │ │ │ ├── closing_loc: (1,30)-(1,31) = "\"" │ │ │ └── unescaped: "a" │ │ ├── @ StringNode (location: (1,33)-(1,36)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (1,33)-(1,34) = "\"" - │ │ │ ├── content_loc: (1,34)-(1,35) = "b" + │ │ │ ├── value_loc: (1,34)-(1,35) = "b" │ │ │ ├── closing_loc: (1,35)-(1,36) = "\"" │ │ │ └── unescaped: "b" │ │ └── @ StringNode (location: (1,38)-(1,41)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (1,38)-(1,39) = "\"" - │ │ ├── content_loc: (1,39)-(1,40) = "c" + │ │ ├── value_loc: (1,39)-(1,40) = "c" │ │ ├── closing_loc: (1,40)-(1,41) = "\"" │ │ └── unescaped: "c" │ ├── opening_loc: (1,27)-(1,28) = "[" diff --git a/snapshots/seattlerb/bug190.txt b/snapshots/seattlerb/bug190.txt index 004ca16a60..d341b6662a 100644 --- a/snapshots/seattlerb/bug190.txt +++ b/snapshots/seattlerb/bug190.txt @@ -8,6 +8,6 @@ └── @ RegularExpressionNode (location: (1,0)-(1,6)) ├── flags: newline, static_literal, forced_us_ascii_encoding ├── opening_loc: (1,0)-(1,3) = "%r'" - ├── content_loc: (1,3)-(1,5) = "\\'" + ├── value_loc: (1,3)-(1,5) = "\\'" ├── closing_loc: (1,5)-(1,6) = "'" └── unescaped: "'" diff --git a/snapshots/seattlerb/bug191.txt b/snapshots/seattlerb/bug191.txt index ec99bd73e2..2f853ad53e 100644 --- a/snapshots/seattlerb/bug191.txt +++ b/snapshots/seattlerb/bug191.txt @@ -28,7 +28,7 @@ │ │ └── @ StringNode (location: (1,4)-(1,6)) │ │ ├── flags: newline │ │ ├── opening_loc: (1,4)-(1,5) = "\"" - │ │ ├── content_loc: (1,5)-(1,5) = "" + │ │ ├── value_loc: (1,5)-(1,5) = "" │ │ ├── closing_loc: (1,5)-(1,6) = "\"" │ │ └── unescaped: "" │ ├── subsequent: @@ -75,7 +75,7 @@ │ └── @ StringNode (location: (3,4)-(3,6)) │ ├── flags: newline │ ├── opening_loc: (3,4)-(3,5) = "'" - │ ├── content_loc: (3,5)-(3,5) = "" + │ ├── value_loc: (3,5)-(3,5) = "" │ ├── closing_loc: (3,5)-(3,6) = "'" │ └── unescaped: "" ├── subsequent: diff --git a/snapshots/seattlerb/bug_249.txt b/snapshots/seattlerb/bug_249.txt index 2cd226915e..d34530651c 100644 --- a/snapshots/seattlerb/bug_249.txt +++ b/snapshots/seattlerb/bug_249.txt @@ -89,7 +89,7 @@ │ │ @ StringNode (location: (4,18)-(4,28)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (4,18)-(4,19) = "'" - │ │ ├── content_loc: (4,19)-(4,27) = "endpoint" + │ │ ├── value_loc: (4,19)-(4,27) = "endpoint" │ │ ├── closing_loc: (4,27)-(4,28) = "'" │ │ └── unescaped: "endpoint" │ └── operator_loc: (4,15)-(4,17) = "=>" diff --git a/snapshots/seattlerb/bug_case_when_regexp.txt b/snapshots/seattlerb/bug_case_when_regexp.txt index baaeac2466..73b59e36c5 100644 --- a/snapshots/seattlerb/bug_case_when_regexp.txt +++ b/snapshots/seattlerb/bug_case_when_regexp.txt @@ -22,7 +22,7 @@ │ │ └── @ RegularExpressionNode (location: (1,14)-(1,17)) │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ ├── opening_loc: (1,14)-(1,15) = "/" - │ │ ├── content_loc: (1,15)-(1,16) = "x" + │ │ ├── value_loc: (1,15)-(1,16) = "x" │ │ ├── closing_loc: (1,16)-(1,17) = "/" │ │ └── unescaped: "x" │ ├── then_keyword_loc: (1,18)-(1,22) = "then" diff --git a/snapshots/seattlerb/bug_comma.txt b/snapshots/seattlerb/bug_comma.txt index 4ffe4b972d..fca7546eb2 100644 --- a/snapshots/seattlerb/bug_comma.txt +++ b/snapshots/seattlerb/bug_comma.txt @@ -23,7 +23,7 @@ │ │ ├── @ StringNode (location: (1,8)-(1,10)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (1,8)-(1,9) = "?" - │ │ │ ├── content_loc: (1,9)-(1,10) = "d" + │ │ │ ├── value_loc: (1,9)-(1,10) = "d" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "d" │ │ └── @ CallNode (location: (1,12)-(1,15)) diff --git a/snapshots/seattlerb/bug_cond_pct.txt b/snapshots/seattlerb/bug_cond_pct.txt index 28bd50bffc..c1a1c4b622 100644 --- a/snapshots/seattlerb/bug_cond_pct.txt +++ b/snapshots/seattlerb/bug_cond_pct.txt @@ -16,7 +16,7 @@ │ │ └── @ RegularExpressionNode (location: (1,11)-(1,23)) │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ ├── opening_loc: (1,11)-(1,14) = "%r%" - │ │ ├── content_loc: (1,14)-(1,22) = "blahblah" + │ │ ├── value_loc: (1,14)-(1,22) = "blahblah" │ │ ├── closing_loc: (1,22)-(1,23) = "%" │ │ └── unescaped: "blahblah" │ ├── then_keyword_loc: ∅ diff --git a/snapshots/seattlerb/case_in.txt b/snapshots/seattlerb/case_in.txt index dce4f4a7e9..4454d66321 100644 --- a/snapshots/seattlerb/case_in.txt +++ b/snapshots/seattlerb/case_in.txt @@ -104,13 +104,13 @@ │ │ │ │ ├── @ StringNode (location: (10,6)-(10,7)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (10,6)-(10,7) = "a" + │ │ │ │ │ ├── value_loc: (10,6)-(10,7) = "a" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "a" │ │ │ │ └── @ StringNode (location: (10,8)-(10,9)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (10,8)-(10,9) = "b" + │ │ │ │ ├── value_loc: (10,8)-(10,9) = "b" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "b" │ │ │ ├── opening_loc: (10,3)-(10,6) = "%W[" @@ -176,13 +176,13 @@ │ │ │ │ ├── @ StringNode (location: (18,6)-(18,7)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (18,6)-(18,7) = "a" + │ │ │ │ │ ├── value_loc: (18,6)-(18,7) = "a" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "a" │ │ │ │ └── @ StringNode (location: (18,8)-(18,9)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (18,8)-(18,9) = "b" + │ │ │ │ ├── value_loc: (18,8)-(18,9) = "b" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "b" │ │ │ ├── opening_loc: (18,3)-(18,6) = "%w[" @@ -397,7 +397,7 @@ │ │ │ @ RegularExpressionNode (location: (46,3)-(46,11)) │ │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ │ ├── opening_loc: (46,3)-(46,4) = "/" - │ │ │ ├── content_loc: (46,4)-(46,10) = "regexp" + │ │ │ ├── value_loc: (46,4)-(46,10) = "regexp" │ │ │ ├── closing_loc: (46,10)-(46,11) = "/" │ │ │ └── unescaped: "regexp" │ │ ├── statements: ∅ @@ -996,7 +996,7 @@ │ │ │ @ XStringNode (location: (98,3)-(98,12)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (98,3)-(98,4) = "`" - │ │ │ ├── content_loc: (98,4)-(98,11) = "echo hi" + │ │ │ ├── value_loc: (98,4)-(98,11) = "echo hi" │ │ │ ├── closing_loc: (98,11)-(98,12) = "`" │ │ │ └── unescaped: "echo hi" │ │ ├── statements: ∅ diff --git a/snapshots/seattlerb/case_in_hash_pat.txt b/snapshots/seattlerb/case_in_hash_pat.txt index c3dc16f867..bc574f5452 100644 --- a/snapshots/seattlerb/case_in_hash_pat.txt +++ b/snapshots/seattlerb/case_in_hash_pat.txt @@ -35,7 +35,7 @@ │ │ │ │ │ @ StringNode (location: (2,8)-(2,11)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: (2,8)-(2,9) = "'" - │ │ │ │ │ ├── content_loc: (2,9)-(2,10) = "c" + │ │ │ │ │ ├── value_loc: (2,9)-(2,10) = "c" │ │ │ │ │ ├── closing_loc: (2,10)-(2,11) = "'" │ │ │ │ │ └── unescaped: "c" │ │ │ │ └── operator_loc: ∅ @@ -52,7 +52,7 @@ │ │ │ │ @ StringNode (location: (2,16)-(2,19)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (2,16)-(2,17) = "\"" - │ │ │ │ ├── content_loc: (2,17)-(2,18) = "e" + │ │ │ │ ├── value_loc: (2,17)-(2,18) = "e" │ │ │ │ ├── closing_loc: (2,18)-(2,19) = "\"" │ │ │ │ └── unescaped: "e" │ │ │ └── operator_loc: ∅ diff --git a/snapshots/seattlerb/case_in_hash_pat_assign.txt b/snapshots/seattlerb/case_in_hash_pat_assign.txt index ebd70af47f..ce89966cf5 100644 --- a/snapshots/seattlerb/case_in_hash_pat_assign.txt +++ b/snapshots/seattlerb/case_in_hash_pat_assign.txt @@ -58,7 +58,7 @@ │ │ │ │ │ @ StringNode (location: (2,25)-(2,28)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: (2,25)-(2,26) = "\"" - │ │ │ │ │ ├── content_loc: (2,26)-(2,27) = "e" + │ │ │ │ │ ├── value_loc: (2,26)-(2,27) = "e" │ │ │ │ │ ├── closing_loc: (2,27)-(2,28) = "\"" │ │ │ │ │ └── unescaped: "e" │ │ │ │ └── operator_loc: ∅ diff --git a/snapshots/seattlerb/difficult0_.txt b/snapshots/seattlerb/difficult0_.txt index 0c7ebb3d30..2420137a51 100644 --- a/snapshots/seattlerb/difficult0_.txt +++ b/snapshots/seattlerb/difficult0_.txt @@ -25,7 +25,7 @@ │ │ │ @ StringNode (location: (1,2)-(1,8)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (1,2)-(1,8) = "<<-END" - │ │ │ ├── content_loc: (2,0)-(3,0) = " a\n" + │ │ │ ├── value_loc: (2,0)-(3,0) = " a\n" │ │ │ ├── closing_loc: (3,0)-(4,0) = " END\n" │ │ │ └── unescaped: " a\n" │ │ ├── call_operator_loc: ∅ @@ -43,13 +43,13 @@ │ │ │ │ ├── @ StringNode (location: (1,10)-(2,0)) │ │ │ │ │ ├── flags: static_literal, frozen │ │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ │ ├── content_loc: (1,10)-(2,0) = "b\n" + │ │ │ │ │ ├── value_loc: (1,10)-(2,0) = "b\n" │ │ │ │ │ ├── closing_loc: ∅ │ │ │ │ │ └── unescaped: "b\n" │ │ │ │ └── @ StringNode (location: (4,0)-(4,3)) │ │ │ │ ├── flags: static_literal, frozen │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (4,0)-(4,3) = " c" + │ │ │ │ ├── value_loc: (4,0)-(4,3) = " c" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: " c" │ │ │ └── closing_loc: (4,3)-(4,4) = "'" @@ -67,7 +67,7 @@ │ │ └── @ StringNode (location: (4,5)-(4,8)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (4,5)-(4,6) = "'" - │ │ ├── content_loc: (4,6)-(4,7) = "d" + │ │ ├── value_loc: (4,6)-(4,7) = "d" │ │ ├── closing_loc: (4,7)-(4,8) = "'" │ │ └── unescaped: "d" │ ├── closing_loc: ∅ diff --git a/snapshots/seattlerb/difficult1_line_numbers2.txt b/snapshots/seattlerb/difficult1_line_numbers2.txt index 83d97619d1..c2fd1ea88f 100644 --- a/snapshots/seattlerb/difficult1_line_numbers2.txt +++ b/snapshots/seattlerb/difficult1_line_numbers2.txt @@ -30,7 +30,7 @@ │ │ │ │ └── @ StringNode (location: (2,4)-(2,7)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (2,4)-(2,5) = "\"" - │ │ │ │ ├── content_loc: (2,5)-(2,6) = "a" + │ │ │ │ ├── value_loc: (2,5)-(2,6) = "a" │ │ │ │ ├── closing_loc: (2,6)-(2,7) = "\"" │ │ │ │ └── unescaped: "a" │ │ │ ├── closing_loc: (2,7)-(2,8) = ")" diff --git a/snapshots/seattlerb/difficult2_.txt b/snapshots/seattlerb/difficult2_.txt index 721cd3a5c0..7146dce930 100644 --- a/snapshots/seattlerb/difficult2_.txt +++ b/snapshots/seattlerb/difficult2_.txt @@ -31,7 +31,7 @@ │ │ │ └── @ StringNode (location: (1,6)-(1,8)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (1,6)-(1,7) = "'" - │ │ │ ├── content_loc: (1,7)-(1,7) = "" + │ │ │ ├── value_loc: (1,7)-(1,7) = "" │ │ │ ├── closing_loc: (1,7)-(1,8) = "'" │ │ │ └── unescaped: "" │ │ ├── closing_loc: (1,8)-(1,9) = ")" diff --git a/snapshots/seattlerb/dstr_evstr.txt b/snapshots/seattlerb/dstr_evstr.txt index c3b5b23628..893ee09ac2 100644 --- a/snapshots/seattlerb/dstr_evstr.txt +++ b/snapshots/seattlerb/dstr_evstr.txt @@ -19,7 +19,7 @@ │ │ │ └── @ StringNode (location: (1,3)-(1,6)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: (1,3)-(1,4) = "'" - │ │ │ ├── content_loc: (1,4)-(1,5) = "a" + │ │ │ ├── value_loc: (1,4)-(1,5) = "a" │ │ │ ├── closing_loc: (1,5)-(1,6) = "'" │ │ │ └── unescaped: "a" │ │ └── closing_loc: (1,6)-(1,7) = "}" diff --git a/snapshots/seattlerb/dstr_str.txt b/snapshots/seattlerb/dstr_str.txt index 9e26a7ebc4..c23b65bd16 100644 --- a/snapshots/seattlerb/dstr_str.txt +++ b/snapshots/seattlerb/dstr_str.txt @@ -19,14 +19,14 @@ │ │ │ └── @ StringNode (location: (1,3)-(1,6)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: (1,3)-(1,4) = "'" - │ │ │ ├── content_loc: (1,4)-(1,5) = "a" + │ │ │ ├── value_loc: (1,4)-(1,5) = "a" │ │ │ ├── closing_loc: (1,5)-(1,6) = "'" │ │ │ └── unescaped: "a" │ │ └── closing_loc: (1,6)-(1,7) = "}" │ └── @ StringNode (location: (1,7)-(1,9)) │ ├── flags: static_literal, frozen │ ├── opening_loc: ∅ - │ ├── content_loc: (1,7)-(1,9) = " b" + │ ├── value_loc: (1,7)-(1,9) = " b" │ ├── closing_loc: ∅ │ └── unescaped: " b" └── closing_loc: (1,9)-(1,10) = "\"" diff --git a/snapshots/seattlerb/evstr_str.txt b/snapshots/seattlerb/evstr_str.txt index 1f279216e1..61e4e868b0 100644 --- a/snapshots/seattlerb/evstr_str.txt +++ b/snapshots/seattlerb/evstr_str.txt @@ -31,7 +31,7 @@ │ └── @ StringNode (location: (1,5)-(1,7)) │ ├── flags: static_literal, frozen │ ├── opening_loc: ∅ - │ ├── content_loc: (1,5)-(1,7) = " b" + │ ├── value_loc: (1,5)-(1,7) = " b" │ ├── closing_loc: ∅ │ └── unescaped: " b" └── closing_loc: (1,7)-(1,8) = "\"" diff --git a/snapshots/seattlerb/heredoc__backslash_dos_format.txt b/snapshots/seattlerb/heredoc__backslash_dos_format.txt index 7d745587b3..1dae6f70d4 100644 --- a/snapshots/seattlerb/heredoc__backslash_dos_format.txt +++ b/snapshots/seattlerb/heredoc__backslash_dos_format.txt @@ -14,7 +14,7 @@ │ @ StringNode (location: (1,6)-(1,12)) │ ├── flags: ∅ │ ├── opening_loc: (1,6)-(1,12) = "<<-XXX" - │ ├── content_loc: (2,0)-(4,0) = "before\\\r\nafter\r\n" + │ ├── value_loc: (2,0)-(4,0) = "before\\\r\nafter\r\n" │ ├── closing_loc: (4,0)-(5,0) = "XXX\r\n" │ └── unescaped: "beforeafter\n" └── operator_loc: (1,4)-(1,5) = "=" diff --git a/snapshots/seattlerb/heredoc_backslash_nl.txt b/snapshots/seattlerb/heredoc_backslash_nl.txt index 4c34bf6ef6..75bcb1da93 100644 --- a/snapshots/seattlerb/heredoc_backslash_nl.txt +++ b/snapshots/seattlerb/heredoc_backslash_nl.txt @@ -8,12 +8,12 @@ ├── @ StringNode (location: (1,0)-(3,1)) │ ├── flags: newline │ ├── opening_loc: (1,0)-(1,1) = "\"" - │ ├── content_loc: (1,1)-(3,0) = " why would someone do this? \\\n blah\n" + │ ├── value_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: newline ├── opening_loc: (5,0)-(5,7) = "<<-DESC" - ├── content_loc: (6,0)-(8,0) = " why would someone do this? \\\n blah\n" + ├── value_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/snapshots/seattlerb/heredoc_bad_hex_escape.txt b/snapshots/seattlerb/heredoc_bad_hex_escape.txt index 1c521108c0..3b52b3ede3 100644 --- a/snapshots/seattlerb/heredoc_bad_hex_escape.txt +++ b/snapshots/seattlerb/heredoc_bad_hex_escape.txt @@ -14,7 +14,7 @@ │ @ StringNode (location: (1,4)-(1,9)) │ ├── flags: forced_utf8_encoding │ ├── opening_loc: (1,4)-(1,9) = "<)" │ │ │ └── closing_loc: (55,6)-(55,7) = "/" @@ -381,7 +381,7 @@ │ │ │ └── @ StringNode (location: (55,11)-(55,13)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (55,11)-(55,12) = "'" - │ │ │ ├── content_loc: (55,12)-(55,12) = "" + │ │ │ ├── value_loc: (55,12)-(55,12) = "" │ │ │ ├── closing_loc: (55,12)-(55,13) = "'" │ │ │ └── unescaped: "" │ │ ├── closing_loc: ∅ @@ -395,7 +395,7 @@ ├── @ StringNode (location: (57,0)-(57,3)) │ ├── flags: newline │ ├── opening_loc: (57,0)-(57,3) = "<a)" │ │ ├── call_operator_loc: ∅ @@ -28,7 +28,7 @@ │ │ │ └── @ StringNode (location: (1,13)-(1,16)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (1,13)-(1,14) = "'" - │ │ │ ├── content_loc: (1,14)-(1,15) = "a" + │ │ │ ├── value_loc: (1,14)-(1,15) = "a" │ │ │ ├── closing_loc: (1,15)-(1,16) = "'" │ │ │ └── unescaped: "a" │ │ ├── closing_loc: ∅ @@ -54,7 +54,7 @@ │ │ │ └── @ StringNode (location: (1,22)-(1,29)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (1,22)-(1,29) = "(?b)" + │ │ │ ├── value_loc: (1,22)-(1,29) = "(?b)" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "(?b)" │ │ └── closing_loc: (1,29)-(1,30) = "/" @@ -69,7 +69,7 @@ │ │ └── @ StringNode (location: (1,34)-(1,37)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (1,34)-(1,35) = "'" - │ │ ├── content_loc: (1,35)-(1,36) = "b" + │ │ ├── value_loc: (1,35)-(1,36) = "b" │ │ ├── closing_loc: (1,36)-(1,37) = "'" │ │ └── unescaped: "b" │ ├── closing_loc: ∅ @@ -99,7 +99,7 @@ │ │ │ @ RegularExpressionNode (location: (3,0)-(3,15)) │ │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ │ ├── opening_loc: (3,0)-(3,1) = "/" - │ │ │ ├── content_loc: (3,1)-(3,14) = "(?bar)" + │ │ │ ├── value_loc: (3,1)-(3,14) = "(?bar)" │ │ │ ├── closing_loc: (3,14)-(3,15) = "/" │ │ │ └── unescaped: "(?bar)" │ │ ├── call_operator_loc: ∅ @@ -113,7 +113,7 @@ │ │ │ └── @ StringNode (location: (3,19)-(3,24)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (3,19)-(3,20) = "'" - │ │ │ ├── content_loc: (3,20)-(3,23) = "bar" + │ │ │ ├── value_loc: (3,20)-(3,23) = "bar" │ │ │ ├── closing_loc: (3,23)-(3,24) = "'" │ │ │ └── unescaped: "bar" │ │ ├── closing_loc: ∅ diff --git a/snapshots/whitequark/non_lvar_injecting_match.txt b/snapshots/whitequark/non_lvar_injecting_match.txt index 0f94c9a99f..78d149f6ab 100644 --- a/snapshots/whitequark/non_lvar_injecting_match.txt +++ b/snapshots/whitequark/non_lvar_injecting_match.txt @@ -26,7 +26,7 @@ │ │ └── @ StringNode (location: (1,5)-(1,18)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (1,5)-(1,18) = "(?bar)" + │ │ ├── value_loc: (1,5)-(1,18) = "(?bar)" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "(?bar)" │ └── closing_loc: (1,18)-(1,19) = "/" @@ -41,7 +41,7 @@ │ └── @ StringNode (location: (1,23)-(1,28)) │ ├── flags: ∅ │ ├── opening_loc: (1,23)-(1,24) = "'" - │ ├── content_loc: (1,24)-(1,27) = "bar" + │ ├── value_loc: (1,24)-(1,27) = "bar" │ ├── closing_loc: (1,27)-(1,28) = "'" │ └── unescaped: "bar" ├── closing_loc: ∅ diff --git a/snapshots/whitequark/parser_bug_640.txt b/snapshots/whitequark/parser_bug_640.txt index 937e0613a5..82b583dd3a 100644 --- a/snapshots/whitequark/parser_bug_640.txt +++ b/snapshots/whitequark/parser_bug_640.txt @@ -12,13 +12,13 @@ │ ├── @ StringNode (location: (2,0)-(3,0)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (2,0)-(3,0) = " baz\\\n" + │ │ ├── value_loc: (2,0)-(3,0) = " baz\\\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "baz" │ └── @ StringNode (location: (3,0)-(4,0)) │ ├── flags: static_literal, frozen │ ├── opening_loc: ∅ - │ ├── content_loc: (3,0)-(4,0) = " qux\n" + │ ├── value_loc: (3,0)-(4,0) = " qux\n" │ ├── closing_loc: ∅ │ └── unescaped: "qux\n" └── closing_loc: (4,0)-(5,0) = "FOO\n" diff --git a/snapshots/whitequark/parser_bug_830.txt b/snapshots/whitequark/parser_bug_830.txt index 4adbe6256a..50437d5138 100644 --- a/snapshots/whitequark/parser_bug_830.txt +++ b/snapshots/whitequark/parser_bug_830.txt @@ -8,6 +8,6 @@ └── @ RegularExpressionNode (location: (1,0)-(1,4)) ├── flags: newline, static_literal, forced_us_ascii_encoding ├── opening_loc: (1,0)-(1,1) = "/" - ├── content_loc: (1,1)-(1,3) = "\\(" + ├── value_loc: (1,1)-(1,3) = "\\(" ├── closing_loc: (1,3)-(1,4) = "/" └── unescaped: "\\(" diff --git a/snapshots/whitequark/parser_bug_989.txt b/snapshots/whitequark/parser_bug_989.txt index d0aec1ff5e..396708f49c 100644 --- a/snapshots/whitequark/parser_bug_989.txt +++ b/snapshots/whitequark/parser_bug_989.txt @@ -8,6 +8,6 @@ └── @ StringNode (location: (1,1)-(1,8)) ├── flags: newline ├── opening_loc: (1,1)-(1,8) = "<<-HERE" - ├── content_loc: (2,0)-(3,0) = "\t\tcontent\n" + ├── value_loc: (2,0)-(3,0) = "\t\tcontent\n" ├── closing_loc: (3,0)-(4,0) = "\tHERE\n" └── unescaped: "\t\tcontent\n" diff --git a/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt b/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt index 3b0f46674b..79766ad2e3 100644 --- a/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt +++ b/snapshots/whitequark/parser_drops_truncated_parts_of_squiggly_heredoc.txt @@ -17,7 +17,7 @@ │ └── @ StringNode (location: (2,5)-(3,0)) │ ├── flags: static_literal, frozen │ ├── opening_loc: ∅ - │ ├── content_loc: (2,5)-(3,0) = "\n" + │ ├── value_loc: (2,5)-(3,0) = "\n" │ ├── closing_loc: ∅ │ └── unescaped: "\n" └── closing_loc: (3,0)-(4,0) = "HERE\n" diff --git a/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt b/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt index ddd38a5ab7..e56e92d6ce 100644 --- a/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt +++ b/snapshots/whitequark/parser_slash_slash_n_escaping_in_literals.txt @@ -8,7 +8,7 @@ ├── @ StringNode (location: (1,0)-(2,2)) │ ├── flags: newline │ ├── opening_loc: (1,0)-(1,1) = "\"" - │ ├── content_loc: (1,1)-(2,1) = "a\\\nb" + │ ├── value_loc: (1,1)-(2,1) = "a\\\nb" │ ├── closing_loc: (2,1)-(2,2) = "\"" │ └── unescaped: "ab" ├── @ ArrayNode (location: (4,0)-(5,2)) @@ -25,7 +25,7 @@ ├── @ StringNode (location: (7,0)-(8,2)) │ ├── flags: newline │ ├── opening_loc: (7,0)-(7,3) = "%Q{" - │ ├── content_loc: (7,3)-(8,1) = "a\\\nb" + │ ├── value_loc: (7,3)-(8,1) = "a\\\nb" │ ├── closing_loc: (8,1)-(8,2) = "}" │ └── unescaped: "ab" ├── @ ArrayNode (location: (10,0)-(11,2)) @@ -34,7 +34,7 @@ │ │ └── @ StringNode (location: (10,3)-(11,1)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (10,3)-(11,1) = "a\\\nb" + │ │ ├── value_loc: (10,3)-(11,1) = "a\\\nb" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "a\nb" │ ├── opening_loc: (10,0)-(10,3) = "%W{" @@ -53,13 +53,13 @@ ├── @ StringNode (location: (16,0)-(17,2)) │ ├── flags: newline │ ├── opening_loc: (16,0)-(16,3) = "%q{" - │ ├── content_loc: (16,3)-(17,1) = "a\\\nb" + │ ├── value_loc: (16,3)-(17,1) = "a\\\nb" │ ├── closing_loc: (17,1)-(17,2) = "}" │ └── unescaped: "a\\\nb" ├── @ RegularExpressionNode (location: (19,0)-(20,2)) │ ├── flags: newline, static_literal, forced_us_ascii_encoding │ ├── opening_loc: (19,0)-(19,3) = "%r{" - │ ├── content_loc: (19,3)-(20,1) = "a\\\nb" + │ ├── value_loc: (19,3)-(20,1) = "a\\\nb" │ ├── closing_loc: (20,1)-(20,2) = "}" │ └── unescaped: "ab" ├── @ SymbolNode (location: (22,0)-(23,2)) @@ -74,7 +74,7 @@ │ │ └── @ StringNode (location: (25,3)-(26,1)) │ │ ├── flags: ∅ │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (25,3)-(26,1) = "a\\\nb" + │ │ ├── value_loc: (25,3)-(26,1) = "a\\\nb" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "a\nb" │ ├── opening_loc: (25,0)-(25,3) = "%w{" @@ -82,25 +82,25 @@ ├── @ XStringNode (location: (28,0)-(29,2)) │ ├── flags: newline │ ├── opening_loc: (28,0)-(28,3) = "%x{" - │ ├── content_loc: (28,3)-(29,1) = "a\\\nb" + │ ├── value_loc: (28,3)-(29,1) = "a\\\nb" │ ├── closing_loc: (29,1)-(29,2) = "}" │ └── unescaped: "ab" ├── @ StringNode (location: (31,0)-(32,2)) │ ├── flags: newline │ ├── opening_loc: (31,0)-(31,2) = "%{" - │ ├── content_loc: (31,2)-(32,1) = "a\\\nb" + │ ├── value_loc: (31,2)-(32,1) = "a\\\nb" │ ├── closing_loc: (32,1)-(32,2) = "}" │ └── unescaped: "ab" ├── @ StringNode (location: (34,0)-(35,2)) │ ├── flags: newline │ ├── opening_loc: (34,0)-(34,1) = "'" - │ ├── content_loc: (34,1)-(35,1) = "a\\\nb" + │ ├── value_loc: (34,1)-(35,1) = "a\\\nb" │ ├── closing_loc: (35,1)-(35,2) = "'" │ └── unescaped: "a\\\nb" ├── @ RegularExpressionNode (location: (37,0)-(38,2)) │ ├── flags: newline, static_literal, forced_us_ascii_encoding │ ├── opening_loc: (37,0)-(37,1) = "/" - │ ├── content_loc: (37,1)-(38,1) = "a\\\nb" + │ ├── value_loc: (37,1)-(38,1) = "a\\\nb" │ ├── closing_loc: (38,1)-(38,2) = "/" │ └── unescaped: "ab" ├── @ SymbolNode (location: (40,0)-(41,2)) @@ -118,24 +118,24 @@ ├── @ StringNode (location: (46,0)-(46,9)) │ ├── flags: newline │ ├── opening_loc: (46,0)-(46,9) = "<<-\"HERE\"" - │ ├── content_loc: (47,0)-(49,0) = "a\\\nb\n" + │ ├── value_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: newline │ ├── opening_loc: (51,0)-(51,9) = "<<-'HERE'" - │ ├── content_loc: (52,0)-(54,0) = "a\\\nb\n" + │ ├── value_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)) │ ├── flags: newline │ ├── opening_loc: (56,0)-(56,9) = "<<-`HERE`" - │ ├── content_loc: (57,0)-(59,0) = "a\\\nb\n" + │ ├── value_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)) ├── flags: newline ├── opening_loc: (61,0)-(61,1) = "`" - ├── content_loc: (61,1)-(62,1) = "a\\\nb" + ├── value_loc: (61,1)-(62,1) = "a\\\nb" ├── closing_loc: (62,1)-(62,2) = "`" └── unescaped: "ab" diff --git a/snapshots/whitequark/pattern_matching_implicit_array_match.txt b/snapshots/whitequark/pattern_matching_implicit_array_match.txt index b9b66ea09c..1158cdc388 100644 --- a/snapshots/whitequark/pattern_matching_implicit_array_match.txt +++ b/snapshots/whitequark/pattern_matching_implicit_array_match.txt @@ -172,7 +172,7 @@ │ │ │ │ ├── @ StringNode (location: (7,16)-(7,19)) │ │ │ │ │ ├── flags: ∅ │ │ │ │ │ ├── opening_loc: (7,16)-(7,17) = "\"" - │ │ │ │ │ ├── content_loc: (7,17)-(7,18) = "a" + │ │ │ │ │ ├── value_loc: (7,17)-(7,18) = "a" │ │ │ │ │ ├── closing_loc: (7,18)-(7,19) = "\"" │ │ │ │ │ └── unescaped: "a" │ │ │ │ ├── @ ArrayPatternNode (location: (7,21)-(7,23)) diff --git a/snapshots/whitequark/regex_interp.txt b/snapshots/whitequark/regex_interp.txt index ae81b20463..21796ba68f 100644 --- a/snapshots/whitequark/regex_interp.txt +++ b/snapshots/whitequark/regex_interp.txt @@ -12,7 +12,7 @@ │ ├── @ StringNode (location: (1,1)-(1,4)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (1,1)-(1,4) = "foo" + │ │ ├── value_loc: (1,1)-(1,4) = "foo" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "foo" │ ├── @ EmbeddedStatementsNode (location: (1,4)-(1,10)) @@ -37,7 +37,7 @@ │ └── @ StringNode (location: (1,10)-(1,13)) │ ├── flags: static_literal, frozen │ ├── opening_loc: ∅ - │ ├── content_loc: (1,10)-(1,13) = "baz" + │ ├── value_loc: (1,10)-(1,13) = "baz" │ ├── closing_loc: ∅ │ └── unescaped: "baz" └── closing_loc: (1,13)-(1,14) = "/" diff --git a/snapshots/whitequark/regex_plain.txt b/snapshots/whitequark/regex_plain.txt index 44dde97c79..89060c47de 100644 --- a/snapshots/whitequark/regex_plain.txt +++ b/snapshots/whitequark/regex_plain.txt @@ -8,6 +8,6 @@ └── @ RegularExpressionNode (location: (1,0)-(1,10)) ├── flags: newline, static_literal, ignore_case, multi_line, forced_us_ascii_encoding ├── opening_loc: (1,0)-(1,1) = "/" - ├── content_loc: (1,1)-(1,7) = "source" + ├── value_loc: (1,1)-(1,7) = "source" ├── closing_loc: (1,7)-(1,10) = "/im" └── unescaped: "source" diff --git a/snapshots/whitequark/ruby_bug_11873.txt b/snapshots/whitequark/ruby_bug_11873.txt index 411f2a2350..3fabcdf729 100644 --- a/snapshots/whitequark/ruby_bug_11873.txt +++ b/snapshots/whitequark/ruby_bug_11873.txt @@ -58,7 +58,7 @@ │ │ └── @ StringNode (location: (1,10)-(1,13)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (1,10)-(1,11) = "\"" - │ │ ├── content_loc: (1,11)-(1,12) = "x" + │ │ ├── value_loc: (1,11)-(1,12) = "x" │ │ ├── closing_loc: (1,12)-(1,13) = "\"" │ │ └── unescaped: "x" │ ├── closing_loc: ∅ @@ -124,7 +124,7 @@ │ │ └── @ RegularExpressionNode (location: (3,10)-(3,13)) │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ ├── opening_loc: (3,10)-(3,11) = "/" - │ │ ├── content_loc: (3,11)-(3,12) = "x" + │ │ ├── value_loc: (3,11)-(3,12) = "x" │ │ ├── closing_loc: (3,12)-(3,13) = "/" │ │ └── unescaped: "x" │ ├── closing_loc: ∅ @@ -190,7 +190,7 @@ │ │ └── @ RegularExpressionNode (location: (5,10)-(5,14)) │ │ ├── flags: static_literal, multi_line, forced_us_ascii_encoding │ │ ├── opening_loc: (5,10)-(5,11) = "/" - │ │ ├── content_loc: (5,11)-(5,12) = "x" + │ │ ├── value_loc: (5,11)-(5,12) = "x" │ │ ├── closing_loc: (5,12)-(5,14) = "/m" │ │ └── unescaped: "x" │ ├── closing_loc: ∅ @@ -256,7 +256,7 @@ │ │ └── @ StringNode (location: (7,11)-(7,14)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (7,11)-(7,12) = "\"" - │ │ ├── content_loc: (7,12)-(7,13) = "x" + │ │ ├── value_loc: (7,12)-(7,13) = "x" │ │ ├── closing_loc: (7,13)-(7,14) = "\"" │ │ └── unescaped: "x" │ ├── closing_loc: ∅ @@ -322,7 +322,7 @@ │ │ └── @ RegularExpressionNode (location: (9,11)-(9,14)) │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ ├── opening_loc: (9,11)-(9,12) = "/" - │ │ ├── content_loc: (9,12)-(9,13) = "x" + │ │ ├── value_loc: (9,12)-(9,13) = "x" │ │ ├── closing_loc: (9,13)-(9,14) = "/" │ │ └── unescaped: "x" │ ├── closing_loc: ∅ @@ -388,7 +388,7 @@ │ │ └── @ RegularExpressionNode (location: (11,11)-(11,15)) │ │ ├── flags: static_literal, multi_line, forced_us_ascii_encoding │ │ ├── opening_loc: (11,11)-(11,12) = "/" - │ │ ├── content_loc: (11,12)-(11,13) = "x" + │ │ ├── value_loc: (11,12)-(11,13) = "x" │ │ ├── closing_loc: (11,13)-(11,15) = "/m" │ │ └── unescaped: "x" │ ├── closing_loc: ∅ @@ -461,7 +461,7 @@ │ │ └── @ StringNode (location: (13,10)-(13,13)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (13,10)-(13,11) = "\"" - │ │ ├── content_loc: (13,11)-(13,12) = "x" + │ │ ├── value_loc: (13,11)-(13,12) = "x" │ │ ├── closing_loc: (13,12)-(13,13) = "\"" │ │ └── unescaped: "x" │ ├── closing_loc: ∅ @@ -534,7 +534,7 @@ │ │ └── @ RegularExpressionNode (location: (15,10)-(15,13)) │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ ├── opening_loc: (15,10)-(15,11) = "/" - │ │ ├── content_loc: (15,11)-(15,12) = "x" + │ │ ├── value_loc: (15,11)-(15,12) = "x" │ │ ├── closing_loc: (15,12)-(15,13) = "/" │ │ └── unescaped: "x" │ ├── closing_loc: ∅ @@ -607,7 +607,7 @@ │ │ └── @ RegularExpressionNode (location: (17,10)-(17,14)) │ │ ├── flags: static_literal, multi_line, forced_us_ascii_encoding │ │ ├── opening_loc: (17,10)-(17,11) = "/" - │ │ ├── content_loc: (17,11)-(17,12) = "x" + │ │ ├── value_loc: (17,11)-(17,12) = "x" │ │ ├── closing_loc: (17,12)-(17,14) = "/m" │ │ └── unescaped: "x" │ ├── closing_loc: ∅ @@ -680,7 +680,7 @@ │ │ └── @ StringNode (location: (19,11)-(19,14)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (19,11)-(19,12) = "\"" - │ │ ├── content_loc: (19,12)-(19,13) = "x" + │ │ ├── value_loc: (19,12)-(19,13) = "x" │ │ ├── closing_loc: (19,13)-(19,14) = "\"" │ │ └── unescaped: "x" │ ├── closing_loc: ∅ @@ -753,7 +753,7 @@ │ │ └── @ RegularExpressionNode (location: (21,11)-(21,14)) │ │ ├── flags: static_literal, forced_us_ascii_encoding │ │ ├── opening_loc: (21,11)-(21,12) = "/" - │ │ ├── content_loc: (21,12)-(21,13) = "x" + │ │ ├── value_loc: (21,12)-(21,13) = "x" │ │ ├── closing_loc: (21,13)-(21,14) = "/" │ │ └── unescaped: "x" │ ├── closing_loc: ∅ @@ -826,7 +826,7 @@ │ └── @ RegularExpressionNode (location: (23,11)-(23,15)) │ ├── flags: static_literal, multi_line, forced_us_ascii_encoding │ ├── opening_loc: (23,11)-(23,12) = "/" - │ ├── content_loc: (23,12)-(23,13) = "x" + │ ├── value_loc: (23,12)-(23,13) = "x" │ ├── closing_loc: (23,13)-(23,15) = "/m" │ └── unescaped: "x" ├── closing_loc: ∅ diff --git a/snapshots/whitequark/ruby_bug_11989.txt b/snapshots/whitequark/ruby_bug_11989.txt index 6c0be687fc..c64605889d 100644 --- a/snapshots/whitequark/ruby_bug_11989.txt +++ b/snapshots/whitequark/ruby_bug_11989.txt @@ -19,7 +19,7 @@ │ └── @ StringNode (location: (1,2)-(1,8)) │ ├── flags: ∅ │ ├── opening_loc: (1,2)-(1,8) = "<<~\"E\"" - │ ├── content_loc: (2,0)-(3,0) = " x\\n y\n" + │ ├── value_loc: (2,0)-(3,0) = " x\\n y\n" │ ├── closing_loc: (3,0)-(4,0) = "E\n" │ └── unescaped: "x\n y\n" ├── closing_loc: ∅ diff --git a/snapshots/whitequark/ruby_bug_11990.txt b/snapshots/whitequark/ruby_bug_11990.txt index e95f4b498f..c5d97cde87 100644 --- a/snapshots/whitequark/ruby_bug_11990.txt +++ b/snapshots/whitequark/ruby_bug_11990.txt @@ -23,13 +23,13 @@ │ │ ├── @ StringNode (location: (1,2)-(1,6)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: (1,2)-(1,6) = "<<~E" - │ │ │ ├── content_loc: (2,0)-(3,0) = " x\n" + │ │ │ ├── value_loc: (2,0)-(3,0) = " x\n" │ │ │ ├── closing_loc: (3,0)-(4,0) = "E\n" │ │ │ └── unescaped: "x\n" │ │ └── @ StringNode (location: (1,7)-(1,12)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: (1,7)-(1,8) = "\"" - │ │ ├── content_loc: (1,8)-(1,11) = " y" + │ │ ├── value_loc: (1,8)-(1,11) = " y" │ │ ├── closing_loc: (1,11)-(1,12) = "\"" │ │ └── unescaped: " y" │ └── closing_loc: ∅ diff --git a/snapshots/whitequark/ruby_bug_12073.txt b/snapshots/whitequark/ruby_bug_12073.txt index 13a48456b8..146eb6c76a 100644 --- a/snapshots/whitequark/ruby_bug_12073.txt +++ b/snapshots/whitequark/ruby_bug_12073.txt @@ -91,7 +91,7 @@ │ │ └── @ StringNode (location: (3,27)-(3,29)) │ │ ├── flags: ∅ │ │ ├── opening_loc: (3,27)-(3,28) = "'" - │ │ ├── content_loc: (3,28)-(3,28) = "" + │ │ ├── value_loc: (3,28)-(3,28) = "" │ │ ├── closing_loc: (3,28)-(3,29) = "'" │ │ └── unescaped: "" │ ├── closing_loc: ∅ diff --git a/snapshots/whitequark/ruby_bug_19539.txt b/snapshots/whitequark/ruby_bug_19539.txt index 9cd8641e66..5d6a290ce6 100644 --- a/snapshots/whitequark/ruby_bug_19539.txt +++ b/snapshots/whitequark/ruby_bug_19539.txt @@ -8,12 +8,12 @@ ├── @ StringNode (location: (1,0)-(1,8)) │ ├── flags: newline │ ├── opening_loc: (1,0)-(1,8) = "<<' FOO'" - │ ├── content_loc: (2,0)-(3,0) = "[Bug #19539]\n" + │ ├── value_loc: (2,0)-(3,0) = "[Bug #19539]\n" │ ├── closing_loc: (3,0)-(4,0) = " FOO\n" │ └── unescaped: "[Bug #19539]\n" └── @ StringNode (location: (6,0)-(6,9)) ├── flags: newline ├── opening_loc: (6,0)-(6,9) = "<<-' FOO'" - ├── content_loc: (7,0)-(8,0) = "[Bug #19539]\n" + ├── value_loc: (7,0)-(8,0) = "[Bug #19539]\n" ├── closing_loc: (8,0)-(9,0) = " FOO\n" └── unescaped: "[Bug #19539]\n" diff --git a/snapshots/whitequark/slash_newline_in_heredocs.txt b/snapshots/whitequark/slash_newline_in_heredocs.txt index f9820c20a5..528fb9bf99 100644 --- a/snapshots/whitequark/slash_newline_in_heredocs.txt +++ b/snapshots/whitequark/slash_newline_in_heredocs.txt @@ -8,7 +8,7 @@ ├── @ StringNode (location: (1,0)-(1,4)) │ ├── flags: newline │ ├── opening_loc: (1,0)-(1,4) = "<<-E" - │ ├── content_loc: (2,0)-(5,0) = " 1 \\\n 2\n 3\n" + │ ├── value_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)) @@ -18,19 +18,19 @@ │ ├── @ StringNode (location: (9,0)-(10,0)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (9,0)-(10,0) = " 1 \\\n" + │ │ ├── value_loc: (9,0)-(10,0) = " 1 \\\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "1 " │ ├── @ StringNode (location: (10,0)-(11,0)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (10,0)-(11,0) = " 2\n" + │ │ ├── value_loc: (10,0)-(11,0) = " 2\n" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "2\n" │ └── @ StringNode (location: (11,0)-(12,0)) │ ├── flags: static_literal, frozen │ ├── opening_loc: ∅ - │ ├── content_loc: (11,0)-(12,0) = " 3\n" + │ ├── value_loc: (11,0)-(12,0) = " 3\n" │ ├── closing_loc: ∅ │ └── unescaped: "3\n" └── closing_loc: (12,0)-(13,0) = "E\n" diff --git a/snapshots/whitequark/string_concat.txt b/snapshots/whitequark/string_concat.txt index 1320fae371..68b43d1a2d 100644 --- a/snapshots/whitequark/string_concat.txt +++ b/snapshots/whitequark/string_concat.txt @@ -16,7 +16,7 @@ │ │ │ ├── @ StringNode (location: (1,1)-(1,4)) │ │ │ │ ├── flags: static_literal, frozen │ │ │ │ ├── opening_loc: ∅ - │ │ │ │ ├── content_loc: (1,1)-(1,4) = "foo" + │ │ │ │ ├── value_loc: (1,1)-(1,4) = "foo" │ │ │ │ ├── closing_loc: ∅ │ │ │ │ └── unescaped: "foo" │ │ │ └── @ EmbeddedVariableNode (location: (1,4)-(1,7)) @@ -30,7 +30,7 @@ │ └── @ StringNode (location: (1,9)-(1,14)) │ ├── flags: static_literal, frozen │ ├── opening_loc: (1,9)-(1,10) = "\"" - │ ├── content_loc: (1,10)-(1,13) = "bar" + │ ├── value_loc: (1,10)-(1,13) = "bar" │ ├── closing_loc: (1,13)-(1,14) = "\"" │ └── unescaped: "bar" └── closing_loc: ∅ diff --git a/snapshots/whitequark/string_dvar.txt b/snapshots/whitequark/string_dvar.txt index ab11f00013..b5bbbc1491 100644 --- a/snapshots/whitequark/string_dvar.txt +++ b/snapshots/whitequark/string_dvar.txt @@ -19,7 +19,7 @@ │ ├── @ StringNode (location: (1,4)-(1,5)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (1,4)-(1,5) = " " + │ │ ├── value_loc: (1,4)-(1,5) = " " │ │ ├── closing_loc: ∅ │ │ └── unescaped: " " │ ├── @ EmbeddedVariableNode (location: (1,5)-(1,9)) @@ -32,7 +32,7 @@ │ ├── @ StringNode (location: (1,9)-(1,10)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (1,9)-(1,10) = " " + │ │ ├── value_loc: (1,9)-(1,10) = " " │ │ ├── closing_loc: ∅ │ │ └── unescaped: " " │ └── @ EmbeddedVariableNode (location: (1,10)-(1,13)) diff --git a/snapshots/whitequark/string_interp.txt b/snapshots/whitequark/string_interp.txt index 2debd17ba2..5c9cfe3340 100644 --- a/snapshots/whitequark/string_interp.txt +++ b/snapshots/whitequark/string_interp.txt @@ -12,7 +12,7 @@ │ ├── @ StringNode (location: (1,1)-(1,4)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (1,1)-(1,4) = "foo" + │ │ ├── value_loc: (1,1)-(1,4) = "foo" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "foo" │ ├── @ EmbeddedStatementsNode (location: (1,4)-(1,10)) @@ -37,7 +37,7 @@ │ └── @ StringNode (location: (1,10)-(1,13)) │ ├── flags: static_literal, frozen │ ├── opening_loc: ∅ - │ ├── content_loc: (1,10)-(1,13) = "baz" + │ ├── value_loc: (1,10)-(1,13) = "baz" │ ├── closing_loc: ∅ │ └── unescaped: "baz" └── closing_loc: (1,13)-(1,14) = "\"" diff --git a/snapshots/whitequark/string_plain.txt b/snapshots/whitequark/string_plain.txt index 0a763cef60..716061302c 100644 --- a/snapshots/whitequark/string_plain.txt +++ b/snapshots/whitequark/string_plain.txt @@ -8,12 +8,12 @@ ├── @ StringNode (location: (1,0)-(1,10)) │ ├── flags: newline │ ├── opening_loc: (1,0)-(1,3) = "%q(" - │ ├── content_loc: (1,3)-(1,9) = "foobar" + │ ├── value_loc: (1,3)-(1,9) = "foobar" │ ├── closing_loc: (1,9)-(1,10) = ")" │ └── unescaped: "foobar" └── @ StringNode (location: (3,0)-(3,8)) ├── flags: newline ├── opening_loc: (3,0)-(3,1) = "'" - ├── content_loc: (3,1)-(3,7) = "foobar" + ├── value_loc: (3,1)-(3,7) = "foobar" ├── closing_loc: (3,7)-(3,8) = "'" └── unescaped: "foobar" diff --git a/snapshots/whitequark/symbol_interp.txt b/snapshots/whitequark/symbol_interp.txt index 567dfa4145..d334c6ad11 100644 --- a/snapshots/whitequark/symbol_interp.txt +++ b/snapshots/whitequark/symbol_interp.txt @@ -12,7 +12,7 @@ │ ├── @ StringNode (location: (1,2)-(1,5)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (1,2)-(1,5) = "foo" + │ │ ├── value_loc: (1,2)-(1,5) = "foo" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "foo" │ ├── @ EmbeddedStatementsNode (location: (1,5)-(1,11)) @@ -37,7 +37,7 @@ │ └── @ StringNode (location: (1,11)-(1,14)) │ ├── flags: static_literal, frozen │ ├── opening_loc: ∅ - │ ├── content_loc: (1,11)-(1,14) = "baz" + │ ├── value_loc: (1,11)-(1,14) = "baz" │ ├── closing_loc: ∅ │ └── unescaped: "baz" └── closing_loc: (1,14)-(1,15) = "\"" diff --git a/snapshots/whitequark/undef.txt b/snapshots/whitequark/undef.txt index a24ba2f868..bfbafdeca7 100644 --- a/snapshots/whitequark/undef.txt +++ b/snapshots/whitequark/undef.txt @@ -27,7 +27,7 @@ │ │ ├── @ StringNode (location: (1,19)-(1,22)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (1,19)-(1,22) = "foo" + │ │ │ ├── value_loc: (1,19)-(1,22) = "foo" │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "foo" │ │ └── @ EmbeddedStatementsNode (location: (1,22)-(1,26)) diff --git a/snapshots/whitequark/when_multi.txt b/snapshots/whitequark/when_multi.txt index 392ac2c74c..31f54d3980 100644 --- a/snapshots/whitequark/when_multi.txt +++ b/snapshots/whitequark/when_multi.txt @@ -27,13 +27,13 @@ │ │ ├── @ StringNode (location: (1,15)-(1,20)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: (1,15)-(1,16) = "'" - │ │ │ ├── content_loc: (1,16)-(1,19) = "bar" + │ │ │ ├── value_loc: (1,16)-(1,19) = "bar" │ │ │ ├── closing_loc: (1,19)-(1,20) = "'" │ │ │ └── unescaped: "bar" │ │ └── @ StringNode (location: (1,22)-(1,27)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: (1,22)-(1,23) = "'" - │ │ ├── content_loc: (1,23)-(1,26) = "baz" + │ │ ├── value_loc: (1,23)-(1,26) = "baz" │ │ ├── closing_loc: (1,26)-(1,27) = "'" │ │ └── unescaped: "baz" │ ├── then_keyword_loc: ∅ diff --git a/snapshots/whitequark/when_then.txt b/snapshots/whitequark/when_then.txt index 6e2e825547..1345ee4e81 100644 --- a/snapshots/whitequark/when_then.txt +++ b/snapshots/whitequark/when_then.txt @@ -27,7 +27,7 @@ │ │ └── @ StringNode (location: (1,15)-(1,20)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: (1,15)-(1,16) = "'" - │ │ ├── content_loc: (1,16)-(1,19) = "bar" + │ │ ├── value_loc: (1,16)-(1,19) = "bar" │ │ ├── closing_loc: (1,19)-(1,20) = "'" │ │ └── unescaped: "bar" │ ├── then_keyword_loc: (1,21)-(1,25) = "then" diff --git a/snapshots/whitequark/xstring_interp.txt b/snapshots/whitequark/xstring_interp.txt index 500b2d9875..a6823e46a4 100644 --- a/snapshots/whitequark/xstring_interp.txt +++ b/snapshots/whitequark/xstring_interp.txt @@ -12,7 +12,7 @@ │ ├── @ StringNode (location: (1,1)-(1,4)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (1,1)-(1,4) = "foo" + │ │ ├── value_loc: (1,1)-(1,4) = "foo" │ │ ├── closing_loc: ∅ │ │ └── unescaped: "foo" │ ├── @ EmbeddedStatementsNode (location: (1,4)-(1,10)) @@ -37,7 +37,7 @@ │ └── @ StringNode (location: (1,10)-(1,13)) │ ├── flags: static_literal, frozen │ ├── opening_loc: ∅ - │ ├── content_loc: (1,10)-(1,13) = "baz" + │ ├── value_loc: (1,10)-(1,13) = "baz" │ ├── closing_loc: ∅ │ └── unescaped: "baz" └── closing_loc: (1,13)-(1,14) = "`" diff --git a/snapshots/whitequark/xstring_plain.txt b/snapshots/whitequark/xstring_plain.txt index dae47ddcff..89c434eff6 100644 --- a/snapshots/whitequark/xstring_plain.txt +++ b/snapshots/whitequark/xstring_plain.txt @@ -8,6 +8,6 @@ └── @ XStringNode (location: (1,0)-(1,8)) ├── flags: newline ├── opening_loc: (1,0)-(1,1) = "`" - ├── content_loc: (1,1)-(1,7) = "foobar" + ├── value_loc: (1,1)-(1,7) = "foobar" ├── closing_loc: (1,7)-(1,8) = "`" └── unescaped: "foobar" diff --git a/snapshots/write_command_operator.txt b/snapshots/write_command_operator.txt index c6403013e9..9602507e97 100644 --- a/snapshots/write_command_operator.txt +++ b/snapshots/write_command_operator.txt @@ -31,7 +31,7 @@ │ │ │ │ └── @ StringNode (location: (1,12)-(1,17)) │ │ │ │ ├── flags: ∅ │ │ │ │ ├── opening_loc: (1,12)-(1,13) = "'" - │ │ │ │ ├── content_loc: (1,13)-(1,16) = "456" + │ │ │ │ ├── value_loc: (1,13)-(1,16) = "456" │ │ │ │ ├── closing_loc: (1,16)-(1,17) = "'" │ │ │ │ └── unescaped: "456" │ │ │ ├── closing_loc: ∅ @@ -70,7 +70,7 @@ │ │ │ └── @ StringNode (location: (3,12)-(3,17)) │ │ │ ├── flags: ∅ │ │ │ ├── opening_loc: (3,12)-(3,13) = "'" - │ │ │ ├── content_loc: (3,13)-(3,16) = "456" + │ │ │ ├── value_loc: (3,13)-(3,16) = "456" │ │ │ ├── closing_loc: (3,16)-(3,17) = "'" │ │ │ └── unescaped: "456" │ │ ├── closing_loc: ∅ diff --git a/snapshots/xstring.txt b/snapshots/xstring.txt index f5d49a71d0..7674295bdc 100644 --- a/snapshots/xstring.txt +++ b/snapshots/xstring.txt @@ -8,7 +8,7 @@ ├── @ XStringNode (location: (1,0)-(1,7)) │ ├── flags: newline │ ├── opening_loc: (1,0)-(1,3) = "%x[" - │ ├── content_loc: (1,3)-(1,6) = "foo" + │ ├── value_loc: (1,3)-(1,6) = "foo" │ ├── closing_loc: (1,6)-(1,7) = "]" │ └── unescaped: "foo" ├── @ InterpolatedXStringNode (location: (3,0)-(3,16)) @@ -18,7 +18,7 @@ │ │ ├── @ StringNode (location: (3,1)-(3,5)) │ │ │ ├── flags: static_literal, frozen │ │ │ ├── opening_loc: ∅ - │ │ │ ├── content_loc: (3,1)-(3,5) = "foo " + │ │ │ ├── value_loc: (3,1)-(3,5) = "foo " │ │ │ ├── closing_loc: ∅ │ │ │ └── unescaped: "foo " │ │ ├── @ EmbeddedStatementsNode (location: (3,5)-(3,11)) @@ -43,43 +43,43 @@ │ │ └── @ StringNode (location: (3,11)-(3,15)) │ │ ├── flags: static_literal, frozen │ │ ├── opening_loc: ∅ - │ │ ├── content_loc: (3,11)-(3,15) = " baz" + │ │ ├── value_loc: (3,11)-(3,15) = " baz" │ │ ├── closing_loc: ∅ │ │ └── unescaped: " baz" │ └── closing_loc: (3,15)-(3,16) = "`" ├── @ XStringNode (location: (5,0)-(5,5)) │ ├── flags: newline │ ├── opening_loc: (5,0)-(5,1) = "`" - │ ├── content_loc: (5,1)-(5,4) = "foo" + │ ├── value_loc: (5,1)-(5,4) = "foo" │ ├── closing_loc: (5,4)-(5,5) = "`" │ └── unescaped: "foo" ├── @ XStringNode (location: (7,0)-(9,1)) │ ├── flags: newline │ ├── opening_loc: (7,0)-(7,3) = "%x{" - │ ├── content_loc: (7,3)-(9,0) = "\n foo\n" + │ ├── value_loc: (7,3)-(9,0) = "\n foo\n" │ ├── closing_loc: (9,0)-(9,1) = "}" │ └── unescaped: "\n foo\n" ├── @ XStringNode (location: (11,0)-(11,2)) │ ├── flags: newline │ ├── opening_loc: (11,0)-(11,1) = "`" - │ ├── content_loc: (11,1)-(11,1) = "" + │ ├── value_loc: (11,1)-(11,1) = "" │ ├── closing_loc: (11,1)-(11,2) = "`" │ └── unescaped: "" ├── @ XStringNode (location: (13,0)-(13,4)) │ ├── flags: newline │ ├── opening_loc: (13,0)-(13,3) = "%x{" - │ ├── content_loc: (13,3)-(13,3) = "" + │ ├── value_loc: (13,3)-(13,3) = "" │ ├── closing_loc: (13,3)-(13,4) = "}" │ └── unescaped: "" ├── @ XStringNode (location: (15,0)-(18,1)) │ ├── flags: newline │ ├── opening_loc: (15,0)-(15,1) = "`" - │ ├── content_loc: (15,1)-(18,0) = "\nfoo\\\nb\\nar\n" + │ ├── value_loc: (15,1)-(18,0) = "\nfoo\\\nb\\nar\n" │ ├── closing_loc: (18,0)-(18,1) = "`" │ └── unescaped: "\nfoob\nar\n" └── @ XStringNode (location: (20,0)-(21,4)) ├── flags: newline ├── opening_loc: (20,0)-(20,1) = "`" - ├── content_loc: (20,1)-(21,3) = "\n’" + ├── value_loc: (20,1)-(21,3) = "\n’" ├── closing_loc: (21,3)-(21,4) = "`" └── unescaped: "\n’" diff --git a/snapshots/xstring_with_backslash.txt b/snapshots/xstring_with_backslash.txt index ca58f5cd40..04e528d643 100644 --- a/snapshots/xstring_with_backslash.txt +++ b/snapshots/xstring_with_backslash.txt @@ -8,6 +8,6 @@ └── @ XStringNode (location: (1,0)-(1,6)) ├── flags: newline ├── opening_loc: (1,0)-(1,1) = "`" - ├── content_loc: (1,1)-(1,5) = "f\\oo" + ├── value_loc: (1,1)-(1,5) = "f\\oo" ├── closing_loc: (1,5)-(1,6) = "`" └── unescaped: "foo" diff --git a/src/prism.c b/src/prism.c index 51980155e4..675f028577 100644 --- a/src/prism.c +++ b/src/prism.c @@ -6860,15 +6860,15 @@ pm_string_node_to_symbol_node(pm_parser_t *parser, pm_string_node_t *node, const PM_NODE_FLAG_STATIC_LITERAL, PM_LOCATION_INIT_TOKENS(parser, opening, closing), TOK2LOC(parser, opening), - node->content_loc, + node->value_loc, TOK2LOC(parser, closing), node->unescaped ); pm_token_t content = { .type = PM_TOKEN_IDENTIFIER, - .start = parser->start + node->content_loc.start, - .end = parser->start + node->content_loc.start + node->content_loc.length + .start = parser->start + node->value_loc.start, + .end = parser->start + node->value_loc.start + node->value_loc.length }; pm_node_flag_set(UP(new_node), parse_symbol_encoding(parser, parser->explicit_encoding, &content, &node->unescaped, true)); @@ -16619,8 +16619,8 @@ parse_heredoc_dedent_string(pm_arena_t *arena, pm_string_t *string, size_t commo static PRISM_INLINE bool heredoc_dedent_discard_string_node(pm_parser_t *parser, pm_string_node_t *string_node) { if (string_node->unescaped.length == 0) { - const uint8_t *cursor = parser->start + PM_LOCATION_START(&string_node->content_loc); - return pm_memchr(cursor, '\\', string_node->content_loc.length, parser->encoding_changed, parser->encoding) == NULL; + const uint8_t *cursor = parser->start + PM_LOCATION_START(&string_node->value_loc); + return pm_memchr(cursor, '\\', string_node->value_loc.length, parser->encoding_changed, parser->encoding) == NULL; } return false; } diff --git a/src/regexp.c b/src/regexp.c index cc17aa4d09..d45209efcb 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -1601,15 +1601,15 @@ pm_regexp_validate_encoding(pm_regexp_parser_t *parser, bool ascii_only, pm_node /** * Parse a regular expression, validate its encoding, and optionally extract - * named capture groups. Encoding validation walks the raw source (content_loc) + * named capture groups. Encoding validation walks the raw source (value_loc) * to distinguish escape-produced bytes from literal bytes. Named capture * extraction walks the unescaped content since escape sequences in group names * (e.g., line continuations) have already been processed by the lexer. */ pm_node_flags_t pm_regexp_parse(pm_parser_t *parser, pm_regular_expression_node_t *node, pm_regexp_name_callback_t name_callback, pm_regexp_name_data_t *name_data) { - const uint8_t *source = parser->start + node->content_loc.start; - size_t size = node->content_loc.length; + const uint8_t *source = parser->start + node->value_loc.start; + size_t size = node->value_loc.length; bool extended_mode = PM_NODE_FLAG_P(node, PM_REGULAR_EXPRESSION_FLAGS_EXTENDED); pm_node_flags_t flags = PM_NODE_FLAGS(node);