#nix #parser #incremental

tree-sitter-nix

nix grammar for the tree-sitter parsing library

1 unstable release

0.0.1 Mar 11, 2023

#127 in #nix

Download history 29/week @ 2023-12-19 13/week @ 2023-12-26 18/week @ 2024-01-02 33/week @ 2024-01-09 30/week @ 2024-01-16 17/week @ 2024-01-23 7/week @ 2024-02-06 28/week @ 2024-02-13 40/week @ 2024-02-20 62/week @ 2024-02-27 47/week @ 2024-03-05 47/week @ 2024-03-12 72/week @ 2024-03-19 55/week @ 2024-03-26 68/week @ 2024-04-02

259 downloads per month
Used in 2 crates

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
~71K SLoC