Skip to content

Commit

Permalink
grammar: also allow | characters in block comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Dec 19, 2023
1 parent bdfcdc7 commit 22530b8
Show file tree
Hide file tree
Showing 4 changed files with 284 additions and 233 deletions.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const COMMENT =
token(/(;)[^\n]*/);

const BLOCK_COMMENT =
token(seq('#|', repeat(/[^|]/), '|#'));
token(seq('#|', repeat(choice(/[^|#]/, seq('#', /[^|]/), seq('|', /[^#]/))), '|#'));

const DIGIT =
/[0-9]/;
Expand Down
35 changes: 33 additions & 2 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 22530b8

Please sign in to comment.