#incremental #parser #ursa

tree-sitter-ursa

Ursa grammar for the tree-sitter parsing library

11 releases (stable)

1.0.8 Feb 8, 2024
1.0.7 Jan 1, 2024
1.0.6 Dec 29, 2023
1.0.4 Nov 18, 2023
0.0.3 Sep 23, 2023

#131 in Text editors

46 downloads per month

MIT license

510KB
16K SLoC

C 16K SLoC JavaScript 153 SLoC // 0.1% comments Scheme 73 SLoC // 0.3% comments Rust 34 SLoC // 0.4% comments

Tree-sitter grammar for Ursa

© 2023 Reuben Thomas

This is a tree-sitter grammar for Ursa.

It is distributed under the ISC licence.

It can be used for example to power the Emacs tree-sitter mode.


lib.rs:

This crate provides Ursa 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_ursa::language()).expect("Error loading Ursa grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~2.7–7.5MB
~143K SLoC