Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apple/tree-sitter-pkl
Tree-sitter parser for Pkl
https://github.com/apple/tree-sitter-pkl
pkl tree-sitter
Last synced: 4 months ago
JSON representation
Tree-sitter parser for Pkl
- Host: GitHub
- URL: https://github.com/apple/tree-sitter-pkl
- Owner: apple
- License: apache-2.0
- Created: 2024-01-19T17:29:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-26T15:00:24.000Z (4 months ago)
- Last Synced: 2024-09-29T21:41:08.385Z (4 months ago)
- Topics: pkl, tree-sitter
- Language: C
- Homepage:
- Size: 1.12 MB
- Stars: 28
- Watchers: 10
- Forks: 8
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.adoc
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.adoc
- Security: SECURITY.adoc
Awesome Lists containing this project
README
A tree-sitter grammar for Pkl.
# install dependencies
$ npm install# build parser
$ npm run build# parse some code
$ ./node_modules/.bin/tree-sitter parse test.pkl# Tests
Tree sitter comes with its own test framework. Files in `test/corpus/`
describe one test each. All tests in `test/corpus/` are performed by the
command$ tree-sitter test
# Upgrading tree-sitter
Upgrading tree-sitter involves upgrading the NPM package.
1. Run `npm update tree-sitter` to install the newer version of tree-sitter.
2. Commit to main, and push.# Releasing
1. Run the build & test to make sure everything is up-to-date and passes (check 0 diff).
2. Create a `Prepare 1.2.3 release` (with appropriate version number) commit where
- Versions are bumped in `package.json`, `Cargo.toml`
- Lockfiles are updated (`npm install`, `cargo check`)
- You have checked the previous release PR for any changes in process not described in this `README.adoc`; if any
- Adopt the changes accordingly
- Update this description to capture the changed process
3. Merge into `main` & push
4. Check that CI release succeeded ([release pipeline](https://app.circleci.com/pipelines/github/apple/tree-sitter-pkl))
5. Check the publication is reachable, [on NPM](https://www.npmjs.com/package/@apple/tree-sitter-pkl)# Resources
- [Tree-sitter docs](https://tree-sitter.github.io/tree-sitter/)
- [Guide to your first Tree-sitter grammar](https://gist.github.com/Aerijo/df27228d70c633e088b0591b8857eeef)