Skip to content

crtschin/tree-sitter-cabal

Repository files navigation

tree-sitter-cabal

Tree-sitter grammars for Haskell's Cabal build system.

  • tree-sitter-cabal.cabal package description files
  • tree-sitter-cabal-projectcabal.project / *.project workspace files

The .cabal grammar was initially forked from magus/tree-sitter-cabal.

Setup

nix develop   # enter dev shell (provides tree-sitter, just, etc.)

Commands

All commands run across both grammars via the top-level justfile.

Command Description
just Run all tests (default)
just test Grammar unit tests + parse-corpus check
just build Generate parser and build shared library
just check Validate grammar without building
just fmt Format grammar files (prettier + nixfmt)
just clean Remove build artifacts

Per-grammar commands are available as just cabal::<cmd> and just cabal-project::<cmd>.

The test target includes a corpus parse over the same test set from the Cabal source files (from the cabal repo) to catch regressions not covered by the inline test cases.

References


Disclaimer: Co-produced with a coding agent.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors