Add support for running script files (indicated by .mse-script extension) from the command line.

This commit is contained in:
Twan van Laarhoven
2020-04-20 01:38:19 +02:00
parent a2b1d2bd80
commit 3dbd03511f
6 changed files with 55 additions and 17 deletions
+5
View File
@@ -172,7 +172,12 @@ void TextIOHandler::show_message(MessageType type, String const& message) {
} else {
*this << RED << _("ERROR: ") << NORMAL << replace_all(message,_("\n"),_("\n ")) << ENDL;
}
encountered_errors = true;
flush();
stream = stdout;
if (raw_mode) raw_mode_status = max(raw_mode_status, type == MESSAGE_WARNING ? 1 : 2);
}
bool TextIOHandler::shown_errors() const {
return encountered_errors;
}