aboutsummaryrefslogtreecommitdiffstats
path: root/tree-sitter-yts/bindings/rust
diff options
context:
space:
mode:
Diffstat (limited to 'tree-sitter-yts/bindings/rust')
-rw-r--r--tree-sitter-yts/bindings/rust/build.rs16
1 files changed, 12 insertions, 4 deletions
diff --git a/tree-sitter-yts/bindings/rust/build.rs b/tree-sitter-yts/bindings/rust/build.rs
index e815dde..0a04e0a 100644
--- a/tree-sitter-yts/bindings/rust/build.rs
+++ b/tree-sitter-yts/bindings/rust/build.rs
@@ -19,12 +19,16 @@ fn main() {
if std::env::var("TARGET").unwrap() == "wasm32-unknown-unknown" {
let Ok(wasm_headers) = std::env::var("DEP_TREE_SITTER_LANGUAGE_WASM_HEADERS") else {
- panic!("Environment variable DEP_TREE_SITTER_LANGUAGE_WASM_HEADERS must be set by the language crate");
+ panic!(
+ "Environment variable DEP_TREE_SITTER_LANGUAGE_WASM_HEADERS must be set by the language crate"
+ );
};
let Ok(wasm_src) =
std::env::var("DEP_TREE_SITTER_LANGUAGE_WASM_SRC").map(std::path::PathBuf::from)
else {
- panic!("Environment variable DEP_TREE_SITTER_LANGUAGE_WASM_SRC must be set by the language crate");
+ panic!(
+ "Environment variable DEP_TREE_SITTER_LANGUAGE_WASM_SRC must be set by the language crate"
+ );
};
c_config.include(&wasm_headers);
@@ -48,11 +52,15 @@ fn main() {
c_config.compile("tree-sitter-yts");
println!("cargo:rustc-check-cfg=cfg(with_highlights_query)");
- if !"queries/highlights.scm".is_empty() && std::path::Path::new("queries/highlights.scm").exists() {
+ if !"queries/highlights.scm".is_empty()
+ && std::path::Path::new("queries/highlights.scm").exists()
+ {
println!("cargo:rustc-cfg=with_highlights_query");
}
println!("cargo:rustc-check-cfg=cfg(with_injections_query)");
- if !"queries/injections.scm".is_empty() && std::path::Path::new("queries/injections.scm").exists() {
+ if !"queries/injections.scm".is_empty()
+ && std::path::Path::new("queries/injections.scm").exists()
+ {
println!("cargo:rustc-cfg=with_injections_query");
}
println!("cargo:rustc-check-cfg=cfg(with_locals_query)");