Skip to content

Commit

Permalink
fix(els): continue analysis even if errors occur
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Jun 16, 2024
1 parent 0b9b89a commit 2c9fe26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/erg_compiler/build_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ impl<ASTBuilder: ASTBuildable, HIRBuilder: Buildable>
self.shared.warns.extend(self.parse_errors.warns.flush());
// continue analysis if ELS mode
} else if self.cfg.mode == ErgMode::LanguageServer {
self.finalize();
// self.finalize();
self.shared.errors.extend(self.parse_errors.errors.flush());
self.shared.warns.extend(self.parse_errors.warns.flush());
} else {
Expand Down
3 changes: 2 additions & 1 deletion crates/erg_compiler/context/inquire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3179,7 +3179,8 @@ impl Context {
}

/// name: Identifier.inspect()
// FIXME: 現在の実装だとimportしたモジュールはどこからでも見れる
// FIXME: imported modules can access from any scope with the current implementation
// 現在の実装だとimportしたモジュールはどこからでも見れる
pub(crate) fn get_mod(&self, name: &str) -> Option<&Context> {
if name == "module" && ERG_MODE {
self.get_module()
Expand Down

0 comments on commit 2c9fe26

Please sign in to comment.