Skip to content

Commit

Permalink
[ new ] New grammar for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
banacorn committed Jun 27, 2019
1 parent 6316189 commit 4f84096
Show file tree
Hide file tree
Showing 5 changed files with 150,493 additions and 149,843 deletions.
4 changes: 4 additions & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ module.exports = grammar({
$.macro,
$.postulate,
$.primitive,
$.test,
),

////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -576,6 +577,9 @@ module.exports = grammar({
),


test: $ => repeat1($.test2),
test2: $ => 'test',

////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prebuild:upload": "prebuild --upload-all",
"test": "npx tree-sitter test",
"iterate": "npx tree-sitter generate && npx tree-sitter test",
"test-scanner": "npx tree-sitter parse test/example.txt"
"test-scanner": "npx tree-sitter generate && npx tree-sitter parse test/example.txt"
},
"repository": {
"type": "git",
Expand Down
15 changes: 15 additions & 0 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,10 @@
{
"type": "SYMBOL",
"name": "primitive"
},
{
"type": "SYMBOL",
"name": "test"
}
]
},
Expand Down Expand Up @@ -2704,6 +2708,17 @@
}
]
},
"test": {
"type": "REPEAT1",
"content": {
"type": "SYMBOL",
"name": "test2"
}
},
"test2": {
"type": "STRING",
"value": "test"
},
"_lambda_binding": {
"type": "CHOICE",
"members": [
Expand Down
Loading

0 comments on commit 4f84096

Please sign in to comment.