Skip to content

Commit

Permalink
Set token precedence for char rule
Browse files Browse the repository at this point in the history
  • Loading branch information
keidax committed Dec 9, 2024
1 parent 16f9a25 commit 6f706bb
Show file tree
Hide file tree
Showing 4 changed files with 12,889 additions and 12,968 deletions.
5 changes: 1 addition & 4 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ module.exports = grammar({
$._delimited_string_contents,
$._string_literal_end,

$._char_comment,

$._string_percent_literal_start,
$._command_percent_literal_start,
$._string_array_percent_literal_start,
Expand Down Expand Up @@ -562,9 +560,8 @@ module.exports = grammar({
char: $ => seq(
'\'',
choice(
token.immediate(/[^\\]/),
token.immediate(prec(1, /[^\\]/)),
$.char_escape_sequence,
$._char_comment
),
token.immediate('\''),
),
Expand Down
16 changes: 6 additions & 10 deletions 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 6f706bb

Please sign in to comment.