Gofra grammar for tree-sitter.
Gofra is a stack-based (RPN) language that compiles to native code, so an
expression is a flat sequence of operands and operators. Blocks are keyword
delimited (if ... else ... end, while ... do ... end).
grammar.js— the grammar definitionsrc/parser.c— the generated parser (committed, so that the grammar can be consumed without running the tree-sitter CLI)queries/highlights.scm— syntax highlighting queriestest/corpus/— parser tests
tree-sitter generate # regenerate src/parser.c after changing grammar.js
tree-sitter test # run the corpus tests
tree-sitter highlight path/to/file.gofThe grammar is used by the Gofra extension for Zed.
MIT