6 releases (3 stable)

1.1.0 Sep 6, 2024
1.0.1 Jun 14, 2024
0.19.5 Feb 28, 2022
0.19.4 Nov 11, 2021
0.19.3 Aug 31, 2021

#475 in Text editors

Download history 74/week @ 2024-12-17 99/week @ 2024-12-24 24/week @ 2024-12-31 130/week @ 2025-01-07 107/week @ 2025-01-14 75/week @ 2025-01-21 32/week @ 2025-01-28 138/week @ 2025-02-04 104/week @ 2025-02-11 97/week @ 2025-02-18 96/week @ 2025-02-25 96/week @ 2025-03-04 223/week @ 2025-03-11 233/week @ 2025-03-18 269/week @ 2025-03-25 833/week @ 2025-04-01

1,567 downloads per month
Used in 6 crates (2 directly)

MIT license

5.5MB
172K SLoC

C 171K SLoC // 0.0% comments JavaScript 390 SLoC // 0.3% comments Scheme 100 SLoC // 0.1% comments Rust 51 SLoC // 0.1% comments

This crate provides R 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 = r#"
"#;
let mut parser = tree_sitter::Parser::new();
let language = tree_sitter_r::LANGUAGE;
parser
    .set_language(&language.into())
    .expect("Error loading R parser");
let tree = parser.parse(code, None).unwrap();
assert!(!tree.root_node().has_error());

tree-sitter-r

An R grammar for tree-sitter.

Rust bindings

This grammar is available as a Rust crate on crates.io.

References

Dependencies