Always show parse tree in REPL, even if we have a diagnostic.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
f328762cd8
commit
d9d52554e4
|
@ -5,7 +5,7 @@
|
|||
#include "../src/Parser/Statements/ParsedStatementStringifier.hpp"
|
||||
#include "InputWindow.hpp"
|
||||
|
||||
void ParseAndUpdate(const std::vector<std::u8string> lines, WINDOW* diagnosticsWindow, WINDOW* parsedWindow,
|
||||
void ParseAndUpdate(const std::vector<std::u8string>& lines, WINDOW* diagnosticsWindow, WINDOW* parsedWindow,
|
||||
MalachScriptRepl::InputWindow& inputWindow) {
|
||||
std::u8string script;
|
||||
for (const auto& line : lines) {
|
||||
|
@ -42,12 +42,10 @@ void ParseAndUpdate(const std::vector<std::u8string> lines, WINDOW* diagnosticsW
|
|||
wrefresh(diagnosticsWindow);
|
||||
|
||||
wclear(parsedWindow);
|
||||
if (logger.GetMessages().empty()) {
|
||||
std::stringstream ss;
|
||||
MalachScript::Parser::ParsedStatementStringifier::Stringify(parsedResult, ss, "", true);
|
||||
std::stringstream ss;
|
||||
MalachScript::Parser::ParsedStatementStringifier::Stringify(parsedResult, ss, "", true);
|
||||
|
||||
waddstr(parsedWindow, ss.str().c_str());
|
||||
}
|
||||
waddstr(parsedWindow, ss.str().c_str());
|
||||
wrefresh(parsedWindow);
|
||||
|
||||
inputWindow.SetScriptWithDiagnostics(script, diag);
|
||||
|
|
Loading…
Reference in New Issue