Tree-sitter grammar for the current Ferret language revision.
This grammar targets the new Ferret syntax in this repo, not the older Ferret compiler syntax.
- imports
- top-level
const - top-level
constraint typedeclarations- generic type/function declarations with
<T>and constrained type parameters - attached methods with
Type::Method(...) let/let mut- local
const if/elsematch- owning pointers, references, raw pointers, optionals, error unions
- array literals and indexing
- postfix
++/-- - Zig-style
.{ ... }and typed.Type{ ... }literals comptimeparameters and prefix expressions- constraint expressions with
&,union,interface, and~Type !!,??,catch
The grammar is configured for .fer files.
tree-sitter generate
tree-sitter test