#parser #tree-sitter #nix #incremental

tree-sitter-nix

nix grammar for the tree-sitter parsing library

1 unstable release

0.0.1 Mar 11, 2023

#147 in #nix

Download history 56/week @ 2024-07-26 38/week @ 2024-08-02 70/week @ 2024-08-09 77/week @ 2024-08-16 50/week @ 2024-08-23 90/week @ 2024-08-30 39/week @ 2024-09-06 50/week @ 2024-09-13 55/week @ 2024-09-20 69/week @ 2024-09-27 32/week @ 2024-10-04 20/week @ 2024-10-11 31/week @ 2024-10-18 345/week @ 2024-10-25 326/week @ 2024-11-01 133/week @ 2024-11-08

836 downloads per month
Used in femark

MIT license

615KB
23K SLoC

C 23K SLoC // 0.0% comments JavaScript 256 SLoC // 0.0% comments Scheme 110 SLoC // 0.2% comments Rust 35 SLoC // 0.4% comments

tree-sitter-nix

Build Status Build Status

Nix grammar for tree-sitter.


lib.rs:

This crate provides nix language support for the tree-sitter parsing library.

Typically, you will use the language function to add this language to a tree-sitter Parser, and then use the parser to parse some code:

let code = "";
let mut parser = tree_sitter::Parser::new();
parser.set_language(tree_sitter_nix::language()).expect("Error loading nix grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~2.7–4MB
~76K SLoC