Skip to content

Commit

Permalink
reduce interploated string nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
1Kinoti committed Sep 19, 2023
1 parent 79d0e05 commit 29dc078
Show file tree
Hide file tree
Showing 6 changed files with 8,688 additions and 8,656 deletions.
4 changes: 2 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,9 +780,9 @@ module.exports = grammar({
$._inter_double_quotes,
),

escaped_interpolated_content: $ => token.immediate(prec(1, /[^"\\(]/)),
escaped_interpolated_content: $ => token.immediate(prec(1, /[^"\\(]+/)),

unescaped_interpolated_content: $ => token.immediate(prec(1, /[^'(]/)),
unescaped_interpolated_content: $ => token.immediate(prec(1, /[^'(]+/)),

_inter_single_quotes: $ => seq(
"$'",
Expand Down
4 changes: 2 additions & 2 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -6192,7 +6192,7 @@
"value": 1,
"content": {
"type": "PATTERN",
"value": "[^\"\\\\(]"
"value": "[^\"\\\\(]+"
}
}
},
Expand All @@ -6203,7 +6203,7 @@
"value": 1,
"content": {
"type": "PATTERN",
"value": "[^'(]"
"value": "[^'(]+"
}
}
},
Expand Down

0 comments on commit 29dc078

Please sign in to comment.