Clean up the return type of parser_t::eval

parser_t::eval indicates whether there was a parse error. It can be
easily confused with the status of the execution. Use a real type to
make it more clear.
This commit is contained in:
ridiculousfish
2019-12-17 15:39:05 -08:00
parent 4f3b3f7d61
commit 09f8e05b80
6 changed files with 52 additions and 34 deletions

View File

@@ -5202,13 +5202,11 @@ static void test_illegal_command_exit_code() {
{L"abc?def", STATUS_UNMATCHED_WILDCARD},
};
int res = 0;
UNUSED(res);
const io_chain_t empty_ios;
parser_t &parser = parser_t::principal_parser();
for (const auto &test : tests) {
res = parser.eval(test.txt, empty_ios, TOP);
parser.eval(test.txt, empty_ios, TOP);
int exit_status = parser.get_last_status();
if (exit_status != test.result) {