forked from IndianBoy42/tree-sitter-just
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the basic skeleton from the tree-sitter organization to create some tests. Add a github CI configuration to run these tests.
- Loading branch information
Showing
5 changed files
with
668 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install modules | ||
run: npm install | ||
- name: Run ESLint | ||
run: npm run lint | ||
|
||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- run: npm install | ||
- run: npm test | ||
- run: tree-sitter parse test/*.just |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,238 @@ | ||
================================================================================ | ||
recipe | ||
================================================================================ | ||
|
||
foo: | ||
body | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(item | ||
(eol | ||
(NEWLINE))) | ||
(item | ||
(recipe | ||
(recipeheader | ||
(NAME)) | ||
(NEWLINE) | ||
(body | ||
(INDENT) | ||
(recipe_body | ||
(line | ||
(recipeline | ||
(notcomment) | ||
(NEWLINE)))) | ||
(MISSING DEDENT))))) | ||
|
||
================================================================================ | ||
quiet | ||
================================================================================ | ||
|
||
@foo: | ||
body | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(item | ||
(eol | ||
(NEWLINE))) | ||
(item | ||
(recipe | ||
(recipeheader | ||
(NAME)) | ||
(NEWLINE) | ||
(body | ||
(INDENT) | ||
(recipe_body | ||
(line | ||
(recipeline | ||
(notcomment) | ||
(NEWLINE)))) | ||
(MISSING DEDENT))))) | ||
|
||
================================================================================ | ||
dependencies | ||
================================================================================ | ||
|
||
foo: bar baz | ||
body | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(item | ||
(eol | ||
(NEWLINE))) | ||
(item | ||
(recipe | ||
(recipeheader | ||
(NAME) | ||
(dependencies | ||
(dependency | ||
(NAME)) | ||
(dependency | ||
(NAME)))) | ||
(NEWLINE) | ||
(body | ||
(INDENT) | ||
(recipe_body | ||
(line | ||
(recipeline | ||
(notcomment) | ||
(NEWLINE)))) | ||
(MISSING DEDENT))))) | ||
|
||
================================================================================ | ||
arguments | ||
================================================================================ | ||
|
||
foo bar *baz: | ||
body | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(item | ||
(eol | ||
(NEWLINE))) | ||
(item | ||
(recipe | ||
(recipeheader | ||
(NAME) | ||
(parameters | ||
(parameter | ||
(NAME)) | ||
(variadic_parameters | ||
(parameter | ||
(NAME))))) | ||
(NEWLINE) | ||
(body | ||
(INDENT) | ||
(recipe_body | ||
(line | ||
(recipeline | ||
(notcomment) | ||
(NEWLINE)))) | ||
(MISSING DEDENT))))) | ||
|
||
================================================================================ | ||
dependency expression | ||
================================================================================ | ||
|
||
foo +bar: baz(bar) | ||
body | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(item | ||
(eol | ||
(NEWLINE))) | ||
(item | ||
(recipe | ||
(recipeheader | ||
(NAME) | ||
(parameters | ||
(parameter | ||
(MISSING NAME)) | ||
(variadic_parameters | ||
(parameter | ||
(NAME)))) | ||
(dependencies | ||
(dependency | ||
(NAME)) | ||
(dependency | ||
(depcall | ||
(NAME))))) | ||
(NEWLINE) | ||
(body | ||
(INDENT) | ||
(recipe_body | ||
(line | ||
(recipeline | ||
(notcomment) | ||
(NEWLINE)))) | ||
(MISSING DEDENT))))) | ||
|
||
================================================================================ | ||
attribute FIXME(attributes): XFAIL no attribute support | ||
================================================================================ | ||
|
||
[attribute] | ||
foo: | ||
body | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(item | ||
(eol | ||
(NEWLINE))) | ||
(ERROR | ||
(INDENT) | ||
(NAME)) | ||
(item | ||
(eol | ||
(NEWLINE))) | ||
(item | ||
(recipe | ||
(recipeheader | ||
(NAME)) | ||
(NEWLINE))) | ||
(ERROR | ||
(NAME)) | ||
(item | ||
(eol | ||
(NEWLINE)))) | ||
|
||
|
||
================================================================================ | ||
shebang | ||
================================================================================ | ||
|
||
foo: | ||
#!/bin/sh | ||
if [ -f "foo" ]; then | ||
echo "foo {{var}}" | ||
fi | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
(source_file | ||
(item | ||
(eol | ||
(NEWLINE))) | ||
(item | ||
(recipe | ||
(recipeheader | ||
(NAME)) | ||
(NEWLINE) | ||
(body | ||
(INDENT) | ||
(shebang_recipe | ||
(shebang | ||
(TEXT) | ||
(NEWLINE)) | ||
(shebang_body | ||
(line | ||
(recipeline | ||
(notcomment) | ||
(TEXT) | ||
(TEXT) | ||
(TEXT) | ||
(TEXT) | ||
(TEXT) | ||
(NEWLINE))) | ||
(line | ||
(recipeline | ||
(notcomment) | ||
(TEXT) | ||
(TEXT) | ||
(NEWLINE))) | ||
(line | ||
(recipeline | ||
(notcomment) | ||
(NEWLINE))))) | ||
(DEDENT))))) |
Oops, something went wrong.