File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed
Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -182,8 +182,8 @@ module.exports = grammar({
182182
183183 string_fragment : _ => token . immediate ( prec ( 1 , / [ ^ " \\ ] + / ) ) ,
184184 _multiline_string_fragment : _ => choice (
185- / [ ^ " ] + / ,
186- seq ( / " ( [ ^ " ] | \\ " ) * / ) ,
185+ / [ ^ " \\ ] + / ,
186+ seq ( / " ( [ ^ " \\ ] | \\ " ) * / ) ,
187187 ) ,
188188
189189 string_interpolation : $ => seq (
Original file line number Diff line number Diff line change @@ -1640,6 +1640,11 @@ string interpolation
16401640STR."Hello There";
16411641STR."Hello \{x + y}";
16421642STR."We can have \{many(of)} \{them.in} a \{row}";
1643+ compPass("""
1644+ StringTemplate result = RAW.\"""
1645+ \\{}
1646+ \""";
1647+ """);
16431648
16441649--------------------------------------------------------------------------------
16451650
@@ -1675,7 +1680,21 @@ STR."We can have \{many(of)} \{them.in} a \{row}";
16751680 (identifier)))
16761681 (string_fragment)
16771682 (string_interpolation
1678- (identifier))))))
1683+ (identifier)))))
1684+ (expression_statement
1685+ (method_invocation
1686+ (identifier)
1687+ (argument_list
1688+ (string_literal
1689+ (multiline_string_fragment)
1690+ (escape_sequence)
1691+ (multiline_string_fragment)
1692+ (multiline_string_fragment)
1693+ (escape_sequence)
1694+ (multiline_string_fragment)
1695+ (escape_sequence)
1696+ (multiline_string_fragment)
1697+ (multiline_string_fragment))))))
16791698
16801699================================================================================
16811700switch with qualified enum constant
Original file line number Diff line number Diff line change @@ -234,6 +234,8 @@ string="has a quote with an escaped end quote\"""";
234234 (multiline_string_fragment)))
235235 (expression_statement
236236 (string_literal
237+ (multiline_string_fragment)
238+ (escape_sequence)
237239 (multiline_string_fragment)))
238240 (expression_statement
239241 (string_literal
You can’t perform that action at this time.
0 commit comments