aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-02-28 02:15:24 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-02-28 02:16:48 -0800
commitbe33d3f2a44ad16358b614c9f47fdb8094b4e127 (patch)
tree6f71351479ec06b1519e2ec5c26e220c1fdd0464 /parser.cpp
parent858b6aa257c13451d0537b19c6f035fdb5114ee6 (diff)
Revert "Merge pull request #1317 from pullreq/cpp"
This reverts commit 74135c0600d5dcc40d396d0e7293c17b8d4bdaa7, reversing changes made to 6d749789ce240a3e6f1447777db63fd8e7525560. See discussion in #1317
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/parser.cpp b/parser.cpp
index 69ff0236..0a4f004a 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -1,4 +1,4 @@
-/** \file parser.cpp
+/** \file parser.c
The fish parser. Contains functions for parsing and evaluating code.
@@ -2590,6 +2590,13 @@ int parser_t::eval_new_parser(const wcstring &cmd, const io_chain_t &io, enum bl
parse_execution_context_t *ctx = new parse_execution_context_t(tree, cmd, this, exec_eval_level);
execution_contexts.push_back(ctx);
+ /* Execute the first node */
+ int result = 1;
+ if (! tree.empty())
+ {
+ result = this->eval_block_node(0, io, block_type);
+ }
+
/* Clean up the execution context stack */
assert(! execution_contexts.empty() && execution_contexts.back() == ctx);
execution_contexts.pop_back();