Unify parse_execution_result_t and eval_result_t again

Do other cleanup to better express the difference between cancellation
and control flow.
This commit is contained in:
ridiculousfish
2019-12-17 18:10:29 -08:00
parent b82b111e55
commit b3d2cdc0ff
5 changed files with 212 additions and 232 deletions

View File

@@ -15,6 +15,7 @@
#include "event.h"
#include "expand.h"
#include "parse_constants.h"
#include "parse_execution.h"
#include "parse_tree.h"
#include "proc.h"
@@ -53,18 +54,6 @@ enum class loop_status_t {
continues, /// current loop block should be skipped
};
/// Result of the source code form of eval.
enum class eval_result_t {
/// eval was able to evaluate the source or tree.
ok,
/// Evaluation was cancelled, e.g. because of a signal.
cancelled,
/// Parse or execution error (but not simply a failed command).
error,
};
/// block_t represents a block of commands.
class block_t {
/// Construct from a block type.