File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -848,9 +848,8 @@ impl YaccParser {
848848 if !( self . lookahead_is ( "|" , i) . is_some ( ) || self . lookahead_is ( ";" , i) . is_some ( ) ) {
849849 return Err ( self . mk_error ( YaccGrammarErrorKind :: ProductionNotTerminated , i) ) ;
850850 }
851- } else if let Some ( mut j) = self . lookahead_is ( "%empty" , i) {
851+ } else if let Some ( j) = self . lookahead_is ( "%empty" , i) {
852852 let k = self . parse_ws ( j, true ) ?;
853- j = self . parse_ws ( j, true ) ?;
854853 // %empty could be followed by all sorts of weird syntax errors: all we try and do
855854 // is say "does this production look like it's finished" and trust that the other
856855 // errors will be caught by other parts of the parser.
@@ -2839,7 +2838,7 @@ B";
28392838Expr: %empty | Factor;
28402839Factor: ')' Expr ')';
28412840" ,
2842- ( 0 , Some ( Span :: new ( 21 , 28 ) ) ) ,
2841+ ( 0 , Some ( Span :: new ( 21 , 27 ) ) ) ,
28432842 ) ,
28442843 (
28452844 "%start Expr
You can’t perform that action at this time.
0 commit comments