Add separated_buffer_t and adopt it in output_stream_t

separated_buffer_t encapsulates the logic around discarding (which
was previously duplicated between output_stream_t and io_buffer_t),
and will also encapsulate the logic around explicitly separated
output.
This commit is contained in:
ridiculousfish
2018-05-29 21:11:34 -07:00
parent 5b9331ade0
commit 90a4af5112
5 changed files with 154 additions and 64 deletions

View File

@@ -328,7 +328,7 @@ parse_execution_result_t parse_execution_context_t::run_function_statement(
proc_set_last_status(err);
if (!streams.err.empty()) {
this->report_error(header, L"%ls", streams.err.buffer().c_str());
this->report_error(header, L"%ls", streams.err.contents().c_str());
result = parse_execution_errored;
}