Move parse tree stringification away from the main parsed statements, and into a helper function class.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include <sstream>
|
||||
#include "../src/Parser/Lexer/Lexer.hpp"
|
||||
#include "../src/Parser/Parser.hpp"
|
||||
#include "../src/Parser/Statements/ParsedStatementStringifier.hpp"
|
||||
|
||||
void UpdateScriptWithParseInfo(WINDOW* inputWindow, const std::u8string& script,
|
||||
const MalachScript::Diagnostics::Diagnostic* diag,
|
||||
@@ -82,7 +83,7 @@ void ParseAndUpdate(const std::vector<std::u8string> lines, WINDOW* diagnosticsW
|
||||
wclear(parsedWindow);
|
||||
if (logger.GetMessages().empty()) {
|
||||
std::stringstream ss;
|
||||
parsedResult->Stringify(ss, "", true);
|
||||
MalachScript::Parser::ParsedStatementStringifier::Stringify(parsedResult, ss, "", true);
|
||||
|
||||
waddstr(parsedWindow, ss.str().c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user