#parser #clingo #incremental

tree-sitter-clingo

Clingo grammar for the tree-sitter parsing library

12 releases

0.0.12 Aug 26, 2022
0.0.11 Aug 26, 2022
0.0.9 Feb 14, 2022
0.0.7 Jan 30, 2022

#221 in Text editors

MIT license

690KB
29K SLoC

C 29K SLoC JavaScript 746 SLoC // 0.0% comments Rust 31 SLoC // 0.5% 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
~71K SLoC