mirror of
https://github.com/elladunbar/tree-sitter-zanscript.git
synced 2025-11-05 15:19:55 -06:00
First commit
This commit is contained in:
commit
9392139a9c
47 changed files with 9107 additions and 0 deletions
22
bindings/rust/build.rs
generated
Normal file
22
bindings/rust/build.rs
generated
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
fn main() {
|
||||
let src_dir = std::path::Path::new("src");
|
||||
|
||||
let mut c_config = cc::Build::new();
|
||||
c_config.std("c11").include(src_dir);
|
||||
|
||||
#[cfg(target_env = "msvc")]
|
||||
c_config.flag("-utf-8");
|
||||
|
||||
let parser_path = src_dir.join("parser.c");
|
||||
c_config.file(&parser_path);
|
||||
println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap());
|
||||
|
||||
// NOTE: if your language uses an external scanner, uncomment this block:
|
||||
/*
|
||||
let scanner_path = src_dir.join("scanner.c");
|
||||
c_config.file(&scanner_path);
|
||||
println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap());
|
||||
*/
|
||||
|
||||
c_config.compile("tree-sitter-YOUR_LANGUAGE_NAME");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue