@@ -222,7 +222,7 @@ struct CliArgs {
222
222
grammar_file : Option < PathBuf > ,
223
223
input_file : Option < PathBuf > ,
224
224
rule : Option < String > ,
225
- breakpoint : Option < String > ,
225
+ breakpoints : Vec < String > ,
226
226
session_file : Option < PathBuf > ,
227
227
no_update : bool ,
228
228
}
@@ -233,7 +233,7 @@ impl Default for CliArgs {
233
233
grammar_file : None ,
234
234
input_file : None ,
235
235
rule : None ,
236
- breakpoint : None ,
236
+ breakpoints : Vec :: new ( ) ,
237
237
session_file : None ,
238
238
no_update : false ,
239
239
} ;
@@ -268,7 +268,7 @@ impl Default for CliArgs {
268
268
}
269
269
"-b" | "--breakpoint" => {
270
270
if let Some ( breakpoint) = iter. next ( ) {
271
- result. breakpoint = Some ( breakpoint) ;
271
+ result. breakpoints . push ( breakpoint) ;
272
272
} else {
273
273
eprintln ! ( "Error: missing breakpoint" ) ;
274
274
std:: process:: exit ( 1 ) ;
@@ -294,7 +294,7 @@ impl Default for CliArgs {
294
294
-g, --grammar <grammar file> - load .pest grammar\n \
295
295
-i, --input <input file> - load input file\n \
296
296
-r, --rule <rule> - run rule\n \
297
- -b, --breakpoint <rule> - breakpoint at rule\n \
297
+ -b, --breakpoint <rule> - breakpoint at rule (can be specified multiple times) \n \
298
298
-s, --session <session file> - load session history file\n \
299
299
-h, --help - print this help menu\n \
300
300
"
@@ -326,8 +326,8 @@ impl CliArgs {
326
326
eprintln ! ( "Error: {}" , e) ;
327
327
}
328
328
}
329
- if let Some ( breakpoint) = & self . breakpoint {
330
- context. breakpoint ( breakpoint) ;
329
+ for breakpoint in self . breakpoints {
330
+ context. breakpoint ( & breakpoint) ;
331
331
}
332
332
if let Some ( rule) = self . rule {
333
333
if let Err ( e) = context. run ( & rule) {
0 commit comments