#tree-sitter #incremental #parser #r

devgen-tree-sitter-r

R grammar for the tree-sitter parsing library

1 unstable release

new 0.21.0 Nov 18, 2024

#479 in Text editors


Used in devgen-splitter

MIT license

2.5MB
74K SLoC

C 74K SLoC // 0.0% comments JavaScript 438 SLoC // 0.1% comments Scheme 102 SLoC // 0.0% comments Rust 34 SLoC // 0.1% comments

tree-sitter-r

Build Status

R grammar for tree-sitter.

Rust bindings

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

References


lib.rs:

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 = "";
let mut parser = tree_sitter::Parser::new();
parser.set_language(tree_sitter_r::language()).expect("Error loading r grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~2.8–4MB
~76K SLoC