Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: grammar rules, fix errors and add more tests #30

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,15 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 19
- run: npm install
- run: npm test
- name: Install rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.79
override: true
components: clippy, rustfmt
- name: Install Tree sitter CLI
run: cargo install tree-sitter-cli
- name: Install dependencies
run: npm install
- name: Tree sitter generate parser and run grammar tests
run: tree-sitter g && tree-sitter t -u
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tree-sitter-kcl"
description = "kcl grammar for the tree-sitter parsing library"
version = "0.0.1"
version = "0.1.0"
keywords = ["incremental", "parsing", "kcl"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter-kcl"
Expand Down
2 changes: 1 addition & 1 deletion Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,21 @@ npm install
Change the grammar in [./grammar.js](./grammar.js) and run the build command

```shell
npm run dev
tree-sitter g
```

### Testing

Add test suites in [./test/corpus/](./test/corpus/) and run the test command

```shell
npm test
tree-sitter t -u
```

## Reference

+ [KCL Grammar](https://www.kcl-lang.io/docs/reference/lang/spec/kcl-spec#grammar)

## License

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkcl-lang%2Ftree-sitter-kcl.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkcl-lang%2Ftree-sitter-kcl?ref=badge_large)
Loading
Loading