Home

Awesome

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
  1. Merge into main & push
  2. Check that CI release succeeded (release pipeline)
  3. Check the publication is reachable, on NPM

Resources