Skip to content

Commit de0fa75

Browse files
authored
Merge pull request #602 from ratmice/cttest_comments
Comment some cttest/build.rs top level code blocks
2 parents 1f0a2ac + ec1e292 commit de0fa75

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

lrpar/cttests/build.rs

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
2424
wasm32_unknown: { all(target_arch = "wasm32", target_os="unknown", target_vendor="unknown") },
2525
}
2626

27+
// The generic `src/*.test` testing all use a `u32` StorageT
28+
// In this block we test `storaget.l`, and `storaget.y` with a `u8` instead.
2729
{
2830
// Because we're modifying the `StorageT` this isn't something `run_test_path` can do,
2931
// Since it modifies the type of the builder.
@@ -47,7 +49,21 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
4749
.build()
4850
.unwrap();
4951
}
52+
println!("cargo::rerun-if-changed=src/storaget.l");
53+
println!(
54+
"cargo::rerun-if-changed={}/storaget.l.rs",
55+
std::env::var("OUT_DIR").unwrap()
56+
);
57+
println!("cargo::rerun-if-changed=src/storaget.y");
58+
println!(
59+
"cargo::rerun-if-changed={}/storaget.y.rs",
60+
std::env::var("OUT_DIR").unwrap()
61+
);
5062

63+
// This block specific to `multi_start.test`
64+
//
65+
// We use `clone_and_change_start_rule` to generate multiple parsers with
66+
// different start rules from a single grammar source.
5167
{
5268
use lrpar::unstable_api::UnstableApi;
5369
// In this case we'll be building multiple grammars
@@ -109,15 +125,5 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
109125
.build()
110126
.unwrap();
111127
}
112-
println!("cargo::rerun-if-changed=src/storaget.l");
113-
println!(
114-
"cargo::rerun-if-changed={}/storaget.l.rs",
115-
std::env::var("OUT_DIR").unwrap()
116-
);
117-
println!("cargo::rerun-if-changed=src/storaget.y");
118-
println!(
119-
"cargo::rerun-if-changed={}/storaget.y.rs",
120-
std::env::var("OUT_DIR").unwrap()
121-
);
122128
Ok(())
123129
}

0 commit comments

Comments
 (0)