-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.rs
39 lines (35 loc) · 1.01 KB
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#![warn(
clippy::all,
clippy::pedantic,
clippy::nursery,
clippy::cargo,
clippy::verbose_file_reads,
clippy::unneeded_field_pattern,
clippy::unnecessary_self_imports,
clippy::string_to_string,
clippy::if_then_some_else_none,
clippy::empty_structs_with_brackets,
//clippy::missing_docs_in_private_items
)]
#![allow(
clippy::multiple_crate_versions,
non_snake_case,
clippy::missing_panics_doc
)]
use std::env;
use std::fs;
use std::path::Path;
fn main() {
let out_dir = env::var_os("OUT_DIR").unwrap();
let dest_path = Path::new(&out_dir).join("hello.rs");
fs::write(
dest_path,
codegen::GenASTNodes::generateFile(&codegen::AST::getAST()),
)
.unwrap();
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-changed=codegen/mod.rs");
println!("cargo:rerun-if-changed=codegen/ClassRepresentation.rs");
println!("cargo:rerun-if-changed=codegen/AST.rs");
println!("cargo:rerun-if-changed=codegen/ASTNodes.rs");
}