Skip to content

Commit

Permalink
Print diagnostics in each interactive loop (#2809)
Browse files Browse the repository at this point in the history
  • Loading branch information
hankluo6 authored Sep 12, 2024
1 parent 728fb21 commit 7eb2bea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bin/lpython.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,8 @@ int interactive_python_repl(
res = fe.evaluate(code_string, verbose, lm, pass_manager, diagnostics);
if (res.ok) {
r = res.result;
std::cerr << diagnostics.render(lm, compiler_options);
diagnostics.clear();
} else {
LCOMPILERS_ASSERT(diagnostics.has_error())
std::cerr << diagnostics.render(lm, compiler_options);
Expand Down

0 comments on commit 7eb2bea

Please sign in to comment.