We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db67087 commit 934e6e7Copy full SHA for 934e6e7
regex-debug/src/main.rs
@@ -51,6 +51,7 @@ Options:
51
extracted.
52
--searcher Show the debug output for the literal searcher
53
constructed by the literals found.
54
+ --quiet Show less output.
55
";
56
57
#[derive(Deserialize)]
@@ -80,6 +81,7 @@ struct Args {
80
81
flag_lcp: bool,
82
flag_lcs: bool,
83
flag_searcher: bool,
84
+ flag_quiet: bool,
85
}
86
87
type Result<T> = result::Result<T, Box<dyn error::Error + Send + Sync>>;
@@ -214,7 +216,11 @@ fn cmd_compile(args: &Args) -> Result<()> {
214
216
.dfa(args.flag_dfa)
215
217
.reverse(args.flag_dfa_reverse);
218
let prog = compiler.compile(&exprs)?;
- print!("{:?}", prog);
219
+ if !args.flag_quiet {
220
+ print!("{:?}", prog);
221
+ } else {
222
+ println!("instruction count: {}", prog.insts.len());
223
+ }
224
Ok(())
225
226
0 commit comments