#tree-sitter #incremental #parser #r

devgen-tree-sitter-r

R grammar for the tree-sitter parsing library

1 unstable release

0.21.0 Nov 18, 2024

#529 in Text editors

Download history 159/week @ 2024-11-18 9/week @ 2024-11-25 7/week @ 2024-12-09

175 downloads per month
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.7–4MB
~76K SLoC