Tree-sitter grammar for KPL (Kernel Programming Language), a systems programming language designed by Harry Porter at Portland State University. KPL compiles to Blitz assembly and runs on the Blitz emulator.
| Extension | Description |
|---|---|
.k |
KPL code files |
.kpl |
KPL code files (alternate) |
.h |
KPL header files |
Add KPL to your nvim-treesitter config. (Instructions TBD once grammar is stable.)
Used by the kpl-linter extension.
These editors can consume tree-sitter grammars directly. (Instructions TBD.)
Requires tree-sitter CLI (>= 0.25).
pnpm install --ignore-scripts # Install deps (generate parser first)
tree-sitter generate # Generate parser from grammar.js
tree-sitter test # Run test corpus
tree-sitter parse examples/Main.k # Parse a file
tree-sitter parse -d examples/Main.k # Parse with debug outputTests live in test/corpus/*.txt:
tree-sitter test # Run all tests
tree-sitter test -i 'test name' # Run a specific test (regex)
tree-sitter test -u # Auto-update expected outputsMIT