Skip to content

Commit a092d48

Browse files
authored
Merge pull request #5 from yuhaos/master
Update the triple string support
2 parents e3c0d49 + b17c180 commit a092d48

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

grammar.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4240,14 +4240,16 @@ const rules = {
42404240
'"""',
42414241
repeat(choice(
42424242
$._triple_quoted_string_item,
4243+
token(prec(1, seq('"', /[^"]/))),
4244+
token(prec(1, seq('""', /[^"]/))),
42434245
$._string_escape_seq
42444246
)),
42454247
'"""'
42464248
),
42474249

42484250
_quoted_string_item: $ => token.immediate(prec(1, /[^\\"\n]+/)), // any_ASCII_character except \ or newline or "
42494251

4250-
_triple_quoted_string_item: $ => token.immediate(prec(1, /[^\\]+/)), // any_ASCII_character except \
4252+
_triple_quoted_string_item: $ => token.immediate(prec(1, /[^\\"]+/)), // any_ASCII_character except \
42514253

42524254
_string_escape_seq: $ => token(prec(1, seq(
42534255
'\\',

0 commit comments

Comments
 (0)