Skip to content

Commit

Permalink
grammar: allow # characters within block-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Dec 19, 2023
1 parent 1ee87c7 commit bdfcdc7
Show file tree
Hide file tree
Showing 6 changed files with 254 additions and 230 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('#|', repeat1(/[^#|]/), '|#'));
token(seq('#|', repeat(/[^|]/), '|#'));

const DIGIT =
/[0-9]/;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"gen": "npx tree-sitter generate",
"test": "npx tree-sitter test",
"parse-sample": "npx tree-sitter parse test/samples/sample.gc"
"parse-sample": "npx tree-sitter parse test/samples/sample.gc",
"parse-test": "npx tree-sitter parse test/samples/test.gc"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 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 bdfcdc7

Please sign in to comment.