Minimal CMake support #572
8 changed files with 49 additions and 0 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
@ -545,6 +545,7 @@ dependencies = [
|
|||
"tree-edit-distance",
|
||||
"tree-sitter",
|
||||
"tree-sitter-c-sharp",
|
||||
"tree-sitter-cmake",
|
||||
"tree-sitter-cpp",
|
||||
"tree-sitter-dart-orchard",
|
||||
"tree-sitter-devicetree",
|
||||
|
@ -996,6 +997,16 @@ dependencies = [
|
|||
"tree-sitter-language",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-cmake"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7c1b35d1dd7396d24b3e826bb0f975b915ec7e9125b989d5e9d24ebb6a08509a"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"tree-sitter-language",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tree-sitter-cpp"
|
||||
version = "0.23.4"
|
||||
|
|
|
@ -55,6 +55,7 @@ tree-sitter-md = "0.3.2"
|
|||
tree-sitter-hcl = "1.1.0"
|
||||
tree-sitter-ini = "1.3.0"
|
||||
tree-sitter-haskell = "0.23.1"
|
||||
tree-sitter-cmake = "0.7.1"
|
||||
regex = "1.11.1"
|
||||
itertools = "0.14.0"
|
||||
tree-sitter-nix = "0.3.0"
|
||||
|
|
|
@ -23,6 +23,7 @@ Mergiraf currently supports the following programming languages:
|
|||
* OCaml (*.ml, *.mli)
|
||||
* Haskell (*.hs)
|
||||
* GNU Make (*.mk, Makefile, GNUmakefile)
|
||||
* CMake (*.cmake, CMakeLists.txt)
|
||||
|
||||
and the following declarative file formats:
|
||||
* JSON (*.json)
|
||||
|
|
6
examples/cmake/working/renaming_same_line/Base.cmake
Normal file
6
examples/cmake/working/renaming_same_line/Base.cmake
Normal file
|
@ -0,0 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.15...4.0)
|
||||
project(
|
||||
ModernCMakeExample
|
||||
VERSION 1.0
|
||||
LANGUAGES CXX)
|
||||
add_executable(simple-example simple_example.cpp)
|
6
examples/cmake/working/renaming_same_line/Expected.cmake
Normal file
6
examples/cmake/working/renaming_same_line/Expected.cmake
Normal file
|
@ -0,0 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.15...4.0)
|
||||
project(
|
||||
ModernCMakeExample
|
||||
VERSION 1.0
|
||||
LANGUAGES CXX)
|
||||
add_executable(complicated-example complicated_example.cpp)
|
6
examples/cmake/working/renaming_same_line/Left.cmake
Normal file
6
examples/cmake/working/renaming_same_line/Left.cmake
Normal file
|
@ -0,0 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.15...4.0)
|
||||
project(
|
||||
ModernCMakeExample
|
||||
VERSION 1.0
|
||||
LANGUAGES CXX)
|
||||
add_executable(complicated-example simple_example.cpp)
|
6
examples/cmake/working/renaming_same_line/Right.cmake
Normal file
6
examples/cmake/working/renaming_same_line/Right.cmake
Normal file
|
@ -0,0 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.15...4.0)
|
||||
project(
|
||||
ModernCMakeExample
|
||||
VERSION 1.0
|
||||
LANGUAGES CXX)
|
||||
add_executable(simple-example complicated_example.cpp)
|
|
@ -1171,6 +1171,18 @@ pub static SUPPORTED_LANGUAGES: LazyLock<Vec<LangProfile>> = LazyLock::new(|| {
|
|||
injections: None,
|
||||
flattened_nodes: &[],
|
||||
},
|
||||
LangProfile {
|
||||
name: "CMake",
|
||||
alternate_names: &["cmake"],
|
||||
extensions: vec!["cmake"],
|
||||
file_names: vec!["CMakeLists.txt"],
|
||||
language: tree_sitter_cmake::LANGUAGE.into(),
|
||||
atomic_nodes: vec![],
|
||||
commutative_parents: vec![],
|
||||
signatures: vec![],
|
||||
injections: None,
|
||||
flattened_nodes: &[],
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue