Vendor the commonlisp parser again

This allows us to use the C library directly. Using the library from
crates.io would require a fairly big MSRV bump.

https://github.com/tree-sitter-grammars/tree-sitter-commonlisp/issues/45

Essentially reverts 87521ed3fc but we
still have the latest version of the upstream grammar.

Fixes #866
pull/874/head
Wilfred Hughes 2025-08-16 12:13:46 +07:00
parent 953a9cd46b
commit 13f786a7be
3 changed files with 8 additions and 2 deletions

@ -82,6 +82,11 @@ fn main() {
src_dir: "vendored_parsers/tree-sitter-cmake-src",
extra_files: vec!["scanner.c"],
},
TreeSitterParser {
name: "tree-sitter-commonlisp",
src_dir: "vendored_parsers/tree-sitter-commonlisp-src",
extra_files: vec![],
},
TreeSitterParser {
name: "tree-sitter-dart",
src_dir: "vendored_parsers/tree-sitter-dart-src",

@ -73,6 +73,7 @@ extern "C" {
fn tree_sitter_apex() -> ts::Language;
fn tree_sitter_clojure() -> ts::Language;
fn tree_sitter_cmake() -> ts::Language;
fn tree_sitter_commonlisp() -> ts::Language;
fn tree_sitter_dart() -> ts::Language;
fn tree_sitter_devicetree() -> ts::Language;
fn tree_sitter_elisp() -> ts::Language;
@ -225,8 +226,7 @@ pub(crate) fn from_language(language: guess::Language) -> TreeSitterConfig {
}
}
CommonLisp => {
let language_fn = tree_sitter_commonlisp::LANGUAGE_COMMONLISP;
let language = tree_sitter::Language::new(language_fn);
let language = unsafe { tree_sitter_commonlisp() };
TreeSitterConfig {
language: language.clone(),

@ -0,0 +1 @@
tree-sitter-commonlisp/src