Skip to content

Commit

Permalink
Merge pull request #30 from 1Kinoti/interpolated
Browse files Browse the repository at this point in the history
reduce interpolated string nodes
  • Loading branch information
fdncred authored Sep 20, 2023
2 parents 79d0e05 + 3cf9118 commit 307559b
Show file tree
Hide file tree
Showing 5 changed files with 8,687 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
Loading

0 comments on commit 307559b

Please sign in to comment.