We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 609ae54 commit d1153f4Copy full SHA for d1153f4
1 file changed
rule-preprocessor/src/main.rs
@@ -19,11 +19,13 @@ use semantic::SemanticAnalysis;
19
use syntactic::SyntacticAnalysis;
20
21
fn main() {
22
- let out_dir = std::env::args()
23
- .nth(1)
24
- .expect("usage: rule-preprocessor <out-dir>");
+ let mut args = std::env::args().skip(1);
+ let out_dir = args
+ .next()
25
+ .expect("usage: rule-preprocessor <out-dir> [rules-crate-dir]");
26
+ let in_dir = args.next().unwrap_or_else(|| "../rules".to_string());
27
SemanticAnalysis::run(SyntacticAnalysis::run(
- &std::fs::canonicalize("../rules").unwrap(),
28
+ &std::fs::canonicalize(&in_dir).unwrap(),
29
))
30
.write_ir(&std::path::PathBuf::from(out_dir));
31
}
0 commit comments