Skip to content

Commit

Permalink
Fix pound sign in char being parsed as a comment
Browse files Browse the repository at this point in the history
6 more stdlib files can now be parsed 😁
  • Loading branch information
nobodywasishere committed Dec 8, 2024
1 parent f5530b7 commit 683782c
Show file tree
Hide file tree
Showing 7 changed files with 23,216 additions and 23,214 deletions.
8 changes: 7 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ 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 @@ -556,7 +558,11 @@ module.exports = grammar({

char: $ => seq(
'\'',
choice(token.immediate(/[^\\]/), $.char_escape_sequence),
choice(
token.immediate(/[^\\]/),
$.char_escape_sequence,
$._char_comment
),
token.immediate('\''),
),

Expand Down
8 changes: 8 additions & 0 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 683782c

Please sign in to comment.