Skip to content

Commit d048418

Browse files
authored
Merge pull request #3667 from Earlopain/string-concat-string-literals-only
Clear `STATIC_LITERAL` flag on interpolated strings
2 parents 96eccfc + 474ad42 commit d048418

35 files changed

+212
-57
lines changed

snapshots/character_literal.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
│ ├── flags: ∅
1818
│ └── arguments: (length: 1)
1919
│ └── @ InterpolatedStringNode (location: (2,2)-(2,11))
20-
│ ├── flags: static_literal
20+
│ ├── flags:
2121
│ ├── opening_loc: ∅
2222
│ ├── parts: (length: 2)
2323
│ │ ├── @ StringNode (location: (2,2)-(2,9))

snapshots/dos_endings.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
│ │ ├── flags: ∅
1818
│ │ └── arguments: (length: 1)
1919
│ │ └── @ InterpolatedStringNode (location: (1,5)-(2,12))
20-
│ │ ├── flags: static_literal
20+
│ │ ├── flags:
2121
│ │ ├── opening_loc: ∅
2222
│ │ ├── parts: (length: 2)
2323
│ │ │ ├── @ StringNode (location: (1,5)-(1,9))
@@ -86,7 +86,7 @@
8686
│ │ ├── flags: ∅
8787
│ │ ├── receiver:
8888
│ │ │ @ InterpolatedStringNode (location: (17,8)-(17,14))
89-
│ │ │ ├── flags: static_literal
89+
│ │ │ ├── flags:
9090
│ │ │ ├── opening_loc: (17,8)-(17,14) = "<<~EOF"
9191
│ │ │ ├── parts: (length: 2)
9292
│ │ │ │ ├── @ StringNode (location: (18,0)-(19,0))

snapshots/dstring.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
│ │ └── closing_loc: (5,7)-(5,8) = "}"
4242
│ └── closing_loc: (5,8)-(5,9) = "\""
4343
├── @ InterpolatedStringNode (location: (7,0)-(9,2))
44-
│ ├── flags: newline, static_literal
44+
│ ├── flags: newline
4545
│ ├── opening_loc: ∅
4646
│ ├── parts: (length: 2)
4747
│ │ ├── @ StringNode (location: (7,0)-(8,2))

snapshots/heredocs_leading_whitespace.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
│ ├── closing_loc: (19,0)-(20,0) = " FOO\n"
3131
│ └── unescaped: "a\nb\n"
3232
├── @ InterpolatedStringNode (location: (21,0)-(21,10))
33-
│ ├── flags: newline, static_literal
33+
│ ├── flags: newline
3434
│ ├── opening_loc: (21,0)-(21,10) = "<<~' FOO'"
3535
│ ├── parts: (length: 2)
3636
│ │ ├── @ StringNode (location: (22,0)-(23,0))
@@ -47,7 +47,7 @@
4747
│ │ └── unescaped: "b\n"
4848
│ └── closing_loc: (24,0)-(25,0) = " FOO\n"
4949
└── @ InterpolatedStringNode (location: (26,0)-(26,10))
50-
├── flags: newline, static_literal
50+
├── flags: newline
5151
├── opening_loc: (26,0)-(26,10) = "<<~' FOO'"
5252
├── parts: (length: 2)
5353
│ ├── @ StringNode (location: (27,0)-(28,0))

snapshots/heredocs_nested.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
├── flags: ∅
77
└── body: (length: 2)
88
├── @ InterpolatedStringNode (location: (1,0)-(1,7))
9-
│ ├── flags: newline, static_literal, mutable
9+
│ ├── flags: newline
1010
│ ├── opening_loc: (1,0)-(1,7) = "<<~RUBY"
1111
│ ├── parts: (length: 4)
1212
│ │ ├── @ StringNode (location: (2,0)-(3,0))

snapshots/heredocs_with_fake_newlines.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
│ ├── closing_loc: (13,0)-(14,0) = "RUBY\n"
1313
│ └── unescaped: " \n\n \n\n exit\n \\n\n \n\n\n\n\n argh\n \\\n \\ foo\nbar\n \f\n ok\n"
1414
├── @ InterpolatedStringNode (location: (15,0)-(15,7))
15-
│ ├── flags: newline, static_literal
15+
│ ├── flags: newline
1616
│ ├── opening_loc: (15,0)-(15,7) = "<<~RUBY"
1717
│ ├── parts: (length: 11)
1818
│ │ ├── @ StringNode (location: (16,0)-(17,0))

snapshots/heredocs_with_ignored_newlines.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
│ ├── closing_loc: (2,0)-(3,0) = "HERE\n"
1313
│ └── unescaped: ""
1414
└── @ InterpolatedStringNode (location: (4,0)-(4,8))
15-
├── flags: newline, static_literal
15+
├── flags: newline
1616
├── opening_loc: (4,0)-(4,8) = "<<~THERE"
1717
├── parts: (length: 9)
1818
│ ├── @ StringNode (location: (5,0)-(6,0))

snapshots/seattlerb/difficult0_.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
│ │ │ ├── flags: ∅
3838
│ │ │ └── arguments: (length: 1)
3939
│ │ │ └── @ InterpolatedStringNode (location: (1,9)-(4,4))
40-
│ │ │ ├── flags: static_literal
40+
│ │ │ ├── flags:
4141
│ │ │ ├── opening_loc: (1,9)-(1,10) = "'"
4242
│ │ │ ├── parts: (length: 2)
4343
│ │ │ │ ├── @ StringNode (location: (1,10)-(2,0))

snapshots/seattlerb/dstr_evstr.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
├── flags: ∅
77
└── body: (length: 1)
88
└── @ InterpolatedStringNode (location: (1,0)-(1,12))
9-
├── flags: newline
9+
├── flags: newline, mutable
1010
├── opening_loc: (1,0)-(1,1) = "\""
1111
├── parts: (length: 2)
1212
│ ├── @ EmbeddedStatementsNode (location: (1,1)-(1,7))

snapshots/seattlerb/dstr_str.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
├── flags: ∅
77
└── body: (length: 1)
88
└── @ InterpolatedStringNode (location: (1,0)-(1,10))
9-
├── flags: newline, static_literal, mutable
9+
├── flags: newline, mutable
1010
├── opening_loc: (1,0)-(1,1) = "\""
1111
├── parts: (length: 2)
1212
│ ├── @ EmbeddedStatementsNode (location: (1,1)-(1,7))

0 commit comments

Comments
 (0)