File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ Options:
51
51
extracted.
52
52
--searcher Show the debug output for the literal searcher
53
53
constructed by the literals found.
54
+ --quiet Show less output.
54
55
" ;
55
56
56
57
#[ derive( Deserialize ) ]
@@ -80,6 +81,7 @@ struct Args {
80
81
flag_lcp : bool ,
81
82
flag_lcs : bool ,
82
83
flag_searcher : bool ,
84
+ flag_quiet : bool ,
83
85
}
84
86
85
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 ) ;
216
218
let prog = compiler. compile ( & exprs) ?;
217
- print ! ( "{:?}" , prog) ;
219
+ if !args. flag_quiet {
220
+ print ! ( "{:?}" , prog) ;
221
+ } else {
222
+ println ! ( "instruction count: {}" , prog. insts. len( ) ) ;
223
+ }
218
224
Ok ( ( ) )
219
225
}
220
226
You can’t perform that action at this time.
0 commit comments