diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2016-02-27 18:37:59 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2016-02-27 18:37:59 -0800 |
commit | d628fe0deaa134efa1205a25e538f3cb828661a0 (patch) | |
tree | da788321b10efb8740607bf454857de10fb783c3 /src/parse_execution.cpp | |
parent | cbd3fa6b01bab709d0b6f5277a984685d8c45888 (diff) |
Eliminate parser_t::show_errors
Errors are now unconditionally shown
Diffstat (limited to 'src/parse_execution.cpp')
-rw-r--r-- | src/parse_execution.cpp | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/src/parse_execution.cpp b/src/parse_execution.cpp index 4ae09b29..c0c10a75 100644 --- a/src/parse_execution.cpp +++ b/src/parse_execution.cpp @@ -720,28 +720,25 @@ parse_execution_result_t parse_execution_context_t::run_while_statement(const pa /* Reports an error. Always returns parse_execution_errored, so you can assign the result to an 'errored' variable */ parse_execution_result_t parse_execution_context_t::report_error(const parse_node_t &node, const wchar_t *fmt, ...) const { - if (parser->show_errors) - { - /* Create an error */ - parse_error_list_t error_list = parse_error_list_t(1); - parse_error_t *error = &error_list.at(0); - error->source_start = node.source_start; - error->source_length = node.source_length; - error->code = parse_error_syntax; //hackish - - va_list va; - va_start(va, fmt); - error->text = vformat_string(fmt, va); - va_end(va); - - this->report_errors(error_list); - } + /* Create an error */ + parse_error_list_t error_list = parse_error_list_t(1); + parse_error_t *error = &error_list.at(0); + error->source_start = node.source_start; + error->source_length = node.source_length; + error->code = parse_error_syntax; //hackish + + va_list va; + va_start(va, fmt); + error->text = vformat_string(fmt, va); + va_end(va); + + this->report_errors(error_list); return parse_execution_errored; } parse_execution_result_t parse_execution_context_t::report_errors(const parse_error_list_t &error_list) const { - if (parser->show_errors && ! parser->cancellation_requested) + if (! parser->cancellation_requested) { if (error_list.empty()) { |