aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_execution.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-29 16:23:26 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-29 16:23:26 -0800
commita9787b769fce4327be5db4f361fb47208d4f79d1 (patch)
treeb71139c1669cb964350ae7b863bfdb14b89c9e86 /parse_execution.h
parenta42711e31cdb41e3c504ed161c07e56698d29e7a (diff)
Support for implicit cd, no-exec, and the exit builtin. All tests now
pass (!). Error reporting still unsteady.
Diffstat (limited to 'parse_execution.h')
-rw-r--r--parse_execution.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/parse_execution.h b/parse_execution.h
index 8d89158b..f68cad5f 100644
--- a/parse_execution.h
+++ b/parse_execution.h
@@ -34,11 +34,23 @@ class parse_execution_context_t
/* Should I cancel? */
bool should_cancel_execution(const block_t *block) const;
+ /* Ways that we can stop executing a block. These are in a sort of ascending order of importance, e.g. `exit` should trump `break` */
+ enum execution_cancellation_reason_t
+ {
+ execution_cancellation_none,
+ execution_cancellation_loop_control,
+ execution_cancellation_skip,
+ execution_cancellation_exit
+ };
+ execution_cancellation_reason_t cancellation_reason(const block_t *block) const;
+
/* Report an error. Always returns true. */
bool append_error(const parse_node_t &node, const wchar_t *fmt, ...);
/* Wildcard error helper */
bool append_unmatched_wildcard_error(const parse_node_t &unmatched_wildcard);
+ void handle_command_not_found(const wcstring &cmd, const parse_node_t &statement_node, int err_code);
+
/* Utilities */
wcstring get_source(const parse_node_t &node) const;
const parse_node_t *get_child(const parse_node_t &parent, node_offset_t which, parse_token_type_t expected_type = token_type_invalid) const;