Skip to content

Commit 75d1b99

Browse files
committed
feat: allow expressions in format strings, that isn't the value of some attribute
1 parent 9f1b887 commit 75d1b99

4 files changed

Lines changed: 445900 additions & 444639 deletions

File tree

grammar.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,17 +1043,20 @@ function exprRule($, quote) {
10431043
seq(
10441044
token.immediate(prec(1, "#[")),
10451045
sep1(
1046-
seq(
1047-
$.attribute,
1048-
optional(
1049-
seq(
1050-
"=",
1051-
repeat(
1052-
choice(
1053-
expr,
1054-
hash_rules($, false),
1055-
token.immediate(
1056-
prec(1, quote == '"' ? /[^,\]"#]+/ : /[^,\]'#]+/),
1046+
choice(
1047+
expr,
1048+
seq(
1049+
$.attribute,
1050+
optional(
1051+
seq(
1052+
"=",
1053+
repeat(
1054+
choice(
1055+
expr,
1056+
hash_rules($, false),
1057+
token.immediate(
1058+
prec(1, quote == '"' ? /[^,\]"#]+/ : /[^,\]'#]+/),
1059+
),
10571060
),
10581061
),
10591062
),

0 commit comments

Comments
 (0)