Skip to content

KittyCAD/tree-sitter-kcl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Treesitter KCL

Treesitter is a grammar generator which helps write IDE tools. For example, Neovim and Helix use treesitter to navigate and add syntax highlighting to files.

Developing

Setting up your dev environment

We use just for convenient script running. You don't need it, but it's helpful.

You need tree-sitter for development.

If you want to use tree-sitter's interactive playground, install emscripten too.

Development workflow

Before contributing, you might want to quickly read the tree-sitter "Creating Parsers" guide.

Use just test to check your code.

Typical workflow:

  • Update statements.txt with a failing test case
  • Run just test-watch to start running tests. They will rerun whenever you change the tests or grammar.
  • Update grammar.js
  • Check that your just test-watch reports all tests are passing.
  • Run just fmt to make sure your code passes our CI formatting check.
  • Consider updating highlights.scm to highlight whatever you added properly. No need to, this is strictly optional.
  • Open a PR.

You can also launch the tree-sitter playground with just playground, then paste in some KCL and see where it's failing.

About

Tree-sitter grammar for KCL

Resources

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •