#parser #clingo #incremental

tree-sitter-clingo

Clingo grammar for the tree-sitter parsing library

13 releases

new 0.0.13 Apr 30, 2024
0.0.12 Aug 26, 2022
0.0.9 Feb 14, 2022
0.0.7 Jan 30, 2022

#134 in Text editors

Download history 10/week @ 2024-02-22 5/week @ 2024-02-29 28/week @ 2024-03-28 16/week @ 2024-04-04 118/week @ 2024-04-11 3/week @ 2024-04-18 112/week @ 2024-04-25

263 downloads per month

MIT license

690KB
30K SLoC

C 29K SLoC JavaScript 746 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.8–4MB
~72K SLoC