diff --git a/crates/erg_compiler/build_package.rs b/crates/erg_compiler/build_package.rs index abcfb05d2..2491c6feb 100644 --- a/crates/erg_compiler/build_package.rs +++ b/crates/erg_compiler/build_package.rs @@ -421,23 +421,8 @@ impl debug_assert!(res.is_ok(), "{:?}", res.unwrap_err()); log!(info "Dependency resolution process completed"); log!("graph:\n{}", self.shared.graph.display()); - if self.parse_errors.errors.is_empty() { - self.shared.warns.extend(self.parse_errors.warns.flush()); - // continue analysis if ELS mode - } else if self.cfg.mode == ErgMode::LanguageServer { - // self.finalize(); - self.shared.errors.extend(self.parse_errors.errors.flush()); - self.shared.warns.extend(self.parse_errors.warns.flush()); - } else { - /* - self.finalize(); - return Err(IncompleteArtifact::new( - None, - self.parse_errors.errors.flush(), - self.parse_errors.warns.flush(), - )); - */ - } + self.shared.errors.extend(self.parse_errors.errors.flush()); + self.shared.warns.extend(self.parse_errors.warns.flush()); self.execute(ast, mode) } diff --git a/crates/erg_parser/parse.rs b/crates/erg_parser/parse.rs index c6367439c..92d3513b3 100644 --- a/crates/erg_parser/parse.rs +++ b/crates/erg_parser/parse.rs @@ -277,7 +277,7 @@ impl Parser { fn next_expr(&mut self) { while let Some(t) = self.peek() { match t.category() { - TC::Separator | TC::DefOp | TC::LambdaOp => { + TC::Separator => { self.skip(); return; }