 
     private func expression() throws -> Expr {
         return try equiality()
+    }
+    
+    private func declaration() throws -> Stmt? {
+        do {
+            if match(.Var) {
+                return try varDeclaration()
+            }
+            
+            return try statement()
+        } catch Error.parseFailure {
+            synchronize()
+            return nil // Recovered from error mode. Return nil and continue parsing.
+        }
     }
     
     private func statement() throws -> Stmt {

        
        do {
            while !isAtEnd() {
                statements.append(try statement())
            }
        } catch {
            return nil


        if match(.number, .string) {
            return Expr.Literal(value: previous().literal)
        }
        
        if match(.identifier) {
            return Expr.Variable(name: previous())
        }

        if match(.leftParen) {
