Skip to content

Commit

Permalink
feat: support single quotes in string literals
Browse files Browse the repository at this point in the history
  • Loading branch information
abalabahaha committed Feb 28, 2023
1 parent 672fe6b commit 3e8a84f
Show file tree
Hide file tree
Showing 4 changed files with 4,692 additions and 4,641 deletions.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@ module.exports = grammar({
_double_quote_string: _ => seq('"', /[^"]*/, '"'),
_literal_string: $ => prec(1,
choice(
seq("'", /[^']*/, "'"),
seq("'", /([^']|'')*/, "'"),
$._double_quote_string,
),
),
Expand Down
2 changes: 1 addition & 1 deletion src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3e8a84f

Please sign in to comment.