#parser #incremental #elsa

tree-sitter-elsa

Elsa grammar for the tree-sitter parsing library

1 stable release

1.1.0 Feb 21, 2023

#347 in Text editors

MIT license

45KB
1.5K SLoC

C 1.5K SLoC JavaScript 43 SLoC // 0.2% comments Rust 34 SLoC // 0.4% comments Scheme 32 SLoC // 0.2% comments

tree-sitter-elsa

Build Status Discord

A tree-sitter grammar for Elsa, a lambda calculus evaluator.

An image of the highlights query


lib.rs:

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

Dependencies

~2.7–4MB
~71K SLoC