@@ -224,8 +224,8 @@ impl<'a> Parser<'a> {
224
224
} ,
225
225
'(' => {
226
226
if self . peek_is ( 1 , '?' ) {
227
- try!( self . expect ( '?' ) )
228
- try!( self . parse_group_opts ( ) )
227
+ try!( self . expect ( '?' ) ) ;
228
+ try!( self . parse_group_opts ( ) ) ;
229
229
} else {
230
230
self . caps += 1 ;
231
231
self . stack . push ( Paren ( self . flags ,
@@ -373,7 +373,7 @@ impl<'a> Parser<'a> {
373
373
fn parse_class ( & mut self ) -> Result < ( ) , Error > {
374
374
let negated =
375
375
if self . peek_is ( 1 , '^' ) {
376
- try!( self . expect ( '^' ) )
376
+ try!( self . expect ( '^' ) ) ;
377
377
FLAG_NEGATED
378
378
} else {
379
379
FLAG_EMPTY
@@ -597,7 +597,7 @@ impl<'a> Parser<'a> {
597
597
// Parses all escape sequences.
598
598
// Assumes that '\' is the current character.
599
599
fn parse_escape ( & mut self ) -> Result < Ast , Error > {
600
- try!( self . noteof ( "an escape sequence following a '\\ '" ) )
600
+ try!( self . noteof ( "an escape sequence following a '\\ '" ) ) ;
601
601
602
602
let c = self . cur ( ) ;
603
603
if is_punct ( c) {
@@ -639,7 +639,7 @@ impl<'a> Parser<'a> {
639
639
let negated = if self . cur ( ) == 'P' { FLAG_NEGATED } else { FLAG_EMPTY } ;
640
640
let mut name: String ;
641
641
if self . peek_is ( 1 , '{' ) {
642
- try!( self . expect ( '{' ) )
642
+ try!( self . expect ( '{' ) ) ;
643
643
let closer =
644
644
match self . pos ( '}' ) {
645
645
Some ( i) => i,
@@ -677,10 +677,10 @@ impl<'a> Parser<'a> {
677
677
let mut end = start + 1 ;
678
678
let ( d2, d3) = ( self . peek ( 1 ) , self . peek ( 2 ) ) ;
679
679
if d2 >= Some ( '0' ) && d2 <= Some ( '7' ) {
680
- try!( self . noteof ( "expected octal character in [0-7]" ) )
680
+ try!( self . noteof ( "expected octal character in [0-7]" ) ) ;
681
681
end += 1 ;
682
682
if d3 >= Some ( '0' ) && d3 <= Some ( '7' ) {
683
- try!( self . noteof ( "expected octal character in [0-7]" ) )
683
+ try!( self . noteof ( "expected octal character in [0-7]" ) ) ;
684
684
end += 1 ;
685
685
}
686
686
}
@@ -698,7 +698,7 @@ impl<'a> Parser<'a> {
698
698
// Assumes that \x has been read.
699
699
fn parse_hex ( & mut self ) -> Result < Ast , Error > {
700
700
if !self . peek_is ( 1 , '{' ) {
701
- try!( self . expect ( '{' ) )
701
+ try!( self . expect ( '{' ) ) ;
702
702
return self . parse_hex_two ( )
703
703
}
704
704
let start = self . chari + 2 ;
@@ -723,7 +723,7 @@ impl<'a> Parser<'a> {
723
723
let ( start, end) = ( self . chari , self . chari + 2 ) ;
724
724
let bad = self . slice ( start - 2 , self . chars . len ( ) ) ;
725
725
try!( self . noteof ( format ! ( "Invalid hex escape sequence '{}'" ,
726
- bad) . as_slice ( ) ) )
726
+ bad) . as_slice ( ) ) ) ;
727
727
self . parse_hex_digits ( self . slice ( start, end) . as_slice ( ) )
728
728
}
729
729
@@ -743,7 +743,7 @@ impl<'a> Parser<'a> {
743
743
// is '<'.
744
744
// When done, parser will be at the closing '>' character.
745
745
fn parse_named_capture ( & mut self ) -> Result < ( ) , Error > {
746
- try!( self . noteof ( "a capture name" ) )
746
+ try!( self . noteof ( "a capture name" ) ) ;
747
747
let closer =
748
748
match self . pos ( '>' ) {
749
749
Some ( i) => i,
@@ -773,15 +773,15 @@ impl<'a> Parser<'a> {
773
773
// character.
774
774
fn parse_group_opts ( & mut self ) -> Result < ( ) , Error > {
775
775
if self . peek_is ( 1 , 'P' ) && self . peek_is ( 2 , '<' ) {
776
- try!( self . expect ( 'P' ) ) try!( self . expect ( '<' ) )
776
+ try!( self . expect ( 'P' ) ) ; try!( self . expect ( '<' ) ) ;
777
777
return self . parse_named_capture ( )
778
778
}
779
779
let start = self . chari ;
780
780
let mut flags = self . flags ;
781
781
let mut sign = 1 i;
782
782
let mut saw_flag = false ;
783
783
loop {
784
- try!( self . noteof ( "expected non-empty set of flags or closing ')'" ) )
784
+ try!( self . noteof ( "expected non-empty set of flags or closing ')'" ) ) ;
785
785
match self . cur ( ) {
786
786
'i' => { flags = flags | FLAG_NOCASE ; saw_flag = true } ,
787
787
'm' => { flags = flags | FLAG_MULTI ; saw_flag = true } ,
@@ -823,7 +823,7 @@ impl<'a> Parser<'a> {
823
823
// If it is, then the next character is consumed.
824
824
fn get_next_greedy ( & mut self ) -> Result < Greed , Error > {
825
825
Ok ( if self . peek_is ( 1 , '?' ) {
826
- try!( self . expect ( '?' ) )
826
+ try!( self . expect ( '?' ) ) ;
827
827
Ungreedy
828
828
} else {
829
829
Greedy
0 commit comments