This repository was archived by the owner on Dec 20, 2024. It is now read-only.
File tree 3 files changed +24
-3
lines changed
3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -182,8 +182,8 @@ module.exports = grammar({
182
182
183
183
string_fragment : _ => token . immediate ( prec ( 1 , / [ ^ " \\ ] + / ) ) ,
184
184
_multiline_string_fragment : _ => choice (
185
- / [ ^ " ] + / ,
186
- seq ( / " ( [ ^ " ] | \\ " ) * / ) ,
185
+ / [ ^ " \\ ] + / ,
186
+ seq ( / " ( [ ^ " \\ ] | \\ " ) * / ) ,
187
187
) ,
188
188
189
189
string_interpolation : $ => seq (
Original file line number Diff line number Diff line change @@ -1640,6 +1640,11 @@ string interpolation
1640
1640
STR."Hello There";
1641
1641
STR."Hello \{x + y}";
1642
1642
STR."We can have \{many(of)} \{them.in} a \{row}";
1643
+ compPass("""
1644
+ StringTemplate result = RAW.\"""
1645
+ \\{}
1646
+ \""";
1647
+ """);
1643
1648
1644
1649
--------------------------------------------------------------------------------
1645
1650
@@ -1675,7 +1680,21 @@ STR."We can have \{many(of)} \{them.in} a \{row}";
1675
1680
(identifier)))
1676
1681
(string_fragment)
1677
1682
(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))))))
1679
1698
1680
1699
================================================================================
1681
1700
switch 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\"""";
234
234
(multiline_string_fragment)))
235
235
(expression_statement
236
236
(string_literal
237
+ (multiline_string_fragment)
238
+ (escape_sequence)
237
239
(multiline_string_fragment)))
238
240
(expression_statement
239
241
(string_literal
You can’t perform that action at this time.
0 commit comments