#nix #parser #incremental

tree-sitter-nix

nix grammar for the tree-sitter parsing library

1 unstable release

0.0.1 Mar 11, 2023

#137 in #nix

Download history 49/week @ 2024-03-13 64/week @ 2024-03-20 69/week @ 2024-03-27 58/week @ 2024-04-03 119/week @ 2024-04-10 85/week @ 2024-04-17 48/week @ 2024-04-24 61/week @ 2024-05-01 42/week @ 2024-05-08 50/week @ 2024-05-15 46/week @ 2024-05-22 58/week @ 2024-05-29 37/week @ 2024-06-05 31/week @ 2024-06-12 38/week @ 2024-06-19 32/week @ 2024-06-26

145 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.8–4MB
~72K SLoC