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 f8235b0 commit d86c4c7
Show file tree
Hide file tree
Showing 7 changed files with 8,654 additions and 8,652 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 @@ -558,7 +560,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 d86c4c7

Please sign in to comment.