@@ -27,7 +27,7 @@ impl<'src, I: Iterator<Item = Token>> Parser<'src, I> {
2727 self . advance ( ) ;
2828 self . expr_bp ( 0 ) ;
2929 self . chunk . emit ( OpCode :: JumpIfFalse , 0 ) ;
30- let jf = self . chunk . instructions . len ( ) - 1 ;
30+ let jf = self . chunk . instructions . len ( ) - 1 ;
3131 self . chunk . emit ( OpCode :: Jump , 0 ) ;
3232 let jmp = self . chunk . instructions . len ( ) - 1 ;
3333 self . patch ( jf) ;
@@ -119,8 +119,8 @@ impl<'src, I: Iterator<Item = Token>> Parser<'src, I> {
119119 TokenType :: Slash => Some ( ( 19 , 20 , OpCode :: Div ) ) ,
120120 TokenType :: Percent => Some ( ( 19 , 20 , OpCode :: Mod ) ) ,
121121 TokenType :: DoubleSlash => Some ( ( 19 , 20 , OpCode :: FloorDiv ) ) ,
122- TokenType :: DoubleStar => Some ( ( 22 , 21 , OpCode :: Pow ) ) , // l_bp > r_bp -> right-assoc: 2**3**2 == 2**(3**2)
123- _ => None ,
122+ TokenType :: DoubleStar => Some ( ( 22 , 21 , OpCode :: Pow ) ) ,
123+ _ => None
124124 }
125125 }
126126
@@ -169,7 +169,7 @@ impl<'src, I: Iterator<Item = Token>> Parser<'src, I> {
169169 }
170170 TokenType :: Complex => {
171171 let raw = self . lexeme ( & t) . replace ( '_' , "" ) ;
172- let s = raw. trim_end_matches ( |c : char | c == 'j' || c == 'J' ) ;
172+ let s = raw. trim_end_matches ( |c : char | c == 'j' || c == 'J' ) ;
173173 self . emit_const ( Value :: Float ( s. parse ( ) . unwrap_or ( 0.0 ) ) ) ;
174174 }
175175 TokenType :: Int | TokenType :: Float => {
@@ -229,7 +229,7 @@ impl<'src, I: Iterator<Item = Token>> Parser<'src, I> {
229229 let mut buf = [ 0u8 ; 128 ] ;
230230 let i = self . chunk . push_name ( Self :: ssa_name ( & name, ver, & mut buf) ) ;
231231 self . chunk . emit ( OpCode :: StoreName , i) ;
232- self . chunk . emit ( OpCode :: LoadName , i) ;
232+ self . chunk . emit ( OpCode :: LoadName , i) ;
233233 }
234234 Some ( TokenType :: Lpar ) => {
235235 let _ = self . call ( name) ;
@@ -379,8 +379,8 @@ impl<'src, I: Iterator<Item = Token>> Parser<'src, I> {
379379 self . expr ( ) ;
380380 self . chunk . emit ( OpCode :: ReturnValue , 0 ) ;
381381
382- let body = core:: mem:: take ( & mut self . chunk ) ;
383- self . chunk = saved_chunk;
382+ let body = core:: mem:: take ( & mut self . chunk ) ;
383+ self . chunk = saved_chunk;
384384 self . ssa_versions = saved_ver;
385385
386386 let fi = self . chunk . functions . len ( ) as u16 ;
0 commit comments