#tree-sitter #clingo #parser #incremental

tree-sitter-clingo

Clingo grammar for the tree-sitter parsing library

14 releases

0.0.14 Jun 25, 2024
0.0.13 Apr 30, 2024
0.0.12 Aug 26, 2022
0.0.9 Feb 14, 2022
0.0.7 Jan 30, 2022

#225 in Text editors

Download history 2/week @ 2024-07-23 8/week @ 2024-07-30 9/week @ 2024-09-10 5/week @ 2024-09-17 30/week @ 2024-09-24 10/week @ 2024-10-01

828 downloads per month

MIT license

690KB
30K SLoC

C 29K SLoC JavaScript 751 SLoC // 0.0% comments Rust 33 SLoC // 0.4% comments

tree-sitter-clingo Build Status Latest Version Rust Documentation

Clingo grammar for tree-sitter


lib.rs:

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

Dependencies

~2.7–4MB
~76K SLoC