File tree 3 files changed +14
-14
lines changed 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -460,8 +460,8 @@ impl YaccParser {
460
460
} else {
461
461
return Err ( YaccGrammarError {
462
462
kind : YaccGrammarErrorKind :: InvalidGrmtoolsHeaderKey ,
463
- spans : vec ! [ Span :: new( i, i) ]
464
- } )
463
+ spans : vec ! [ Span :: new( i, i) ] ,
464
+ } ) ;
465
465
}
466
466
let val_end_pos = self . parse_yacckind ( i, update_yacc_kind) ?;
467
467
if let Some ( orig) = yacc_kind_key_span {
@@ -476,9 +476,9 @@ impl YaccParser {
476
476
}
477
477
if let Some ( j) = self . lookahead_is ( "," , i) {
478
478
i = self . parse_ws ( j, true ) ?;
479
- continue
479
+ continue ;
480
480
} else {
481
- break
481
+ break ;
482
482
}
483
483
} else {
484
484
return Err ( YaccGrammarError {
@@ -2885,8 +2885,8 @@ B";
2885
2885
Start -> () : ;
2886
2886
"# ;
2887
2887
YaccParser :: new ( YaccKindResolver :: NoDefault , src. to_string ( ) )
2888
- . parse ( )
2889
- . unwrap ( ) ;
2888
+ . parse ( )
2889
+ . unwrap ( ) ;
2890
2890
let src = r#"
2891
2891
%grmtools{
2892
2892
yacckind: YaccKind::Grmtools
@@ -2895,8 +2895,8 @@ B";
2895
2895
Start -> () : ;
2896
2896
"# ;
2897
2897
YaccParser :: new ( YaccKindResolver :: NoDefault , src. to_string ( ) )
2898
- . parse ( )
2899
- . unwrap ( ) ;
2898
+ . parse ( )
2899
+ . unwrap ( ) ;
2900
2900
}
2901
2901
2902
2902
#[ test]
Original file line number Diff line number Diff line change @@ -1924,10 +1924,10 @@ b "A"
1924
1924
3 ,
1925
1925
3 ,
1926
1926
) ;
1927
- // The following is missing comma separators for more than 2 elements
1928
- // This is to avoid parsing it as "key value" number of elements.
1929
- // However we actually error after the first element since the parser
1930
- // knows "case_insensitive" is a flag with no arguments.
1927
+ // The following is missing comma separators for more than 2 elements
1928
+ // This is to avoid parsing it as "key value" number of elements.
1929
+ // However we actually error after the first element since the parser
1930
+ // knows "case_insensitive" is a flag with no arguments.
1931
1931
let src = r#"
1932
1932
%grmtools {unicode, case_insensitive posix_escapes allow_comments}
1933
1933
%%
Original file line number Diff line number Diff line change @@ -319,10 +319,10 @@ fn test_expect() {
319
319
#[ test]
320
320
fn test_grmtools_section_files ( ) {
321
321
use glob:: glob;
322
+ use std:: env;
322
323
use std:: fs:: File ;
323
- use std:: io:: { BufRead as _, Read as _} ;
324
324
use std:: io:: BufReader ;
325
- use std:: env ;
325
+ use std:: io :: { BufRead as _ , Read as _ } ;
326
326
327
327
let manifest_dir = env:: var ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) ;
328
328
let examples_glob = format ! ( "{manifest_dir}/../examples/**" ) ;
You can’t perform that action at this time.
0 commit comments