Ver Fonte

cargo fmt

Nils Boettcher há 2 meses atrás
pai
commit
3d738c6c56
1 ficheiros alterados com 8 adições e 2 exclusões
  1. 8 2
      numbat/src/parser.rs

+ 8 - 2
numbat/src/parser.rs

@@ -363,7 +363,10 @@ impl<'a> Parser<'a> {
     /// Must be called after encountering an error.
     fn recover_from_error(&mut self, tokens: &[Token]) {
         // Skip all the tokens until we encounter a newline or EoF.
-        while !matches!(self.peek(tokens).kind, TokenKind::Newline | TokenKind::Semicolon | TokenKind::Eof) {
+        while !matches!(
+            self.peek(tokens).kind,
+            TokenKind::Newline | TokenKind::Semicolon | TokenKind::Eof
+        ) {
             self.advance(tokens)
         }
     }
@@ -2008,7 +2011,10 @@ impl<'a> Parser<'a> {
     }
 
     pub fn is_end_of_statement(&self, tokens: &[Token]) -> bool {
-        matches!( self.peek(tokens).kind, TokenKind::Newline | TokenKind::Semicolon | TokenKind::Eof)
+        matches!(
+            self.peek(tokens).kind,
+            TokenKind::Newline | TokenKind::Semicolon | TokenKind::Eof
+        )
     }
 
     pub fn is_at_end(&self, tokens: &[Token]) -> bool {