aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-28 16:18:38 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-28 16:18:38 -0800
commit0f9de11a67a5bbf3fe0c3be7f55cb25a7987ed4d (patch)
tree40c6c53ac7b94969823ecb73c145862f9d617723 /parser.cpp
parent715823a6665a63df5a7ae6e5a9adcbe287626c1c (diff)
Fix issues related to redirections and block level IO with new parser
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/parser.cpp b/parser.cpp
index 1f331dc5..c3b9578a 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -2610,14 +2610,14 @@ int parser_t::eval_new_parser(const wcstring &cmd, const io_chain_t &io, enum bl
}
/* Append to the execution context stack */
- parse_execution_context_t *ctx = new parse_execution_context_t(tree, cmd, io, this);
+ parse_execution_context_t *ctx = new parse_execution_context_t(tree, cmd, this);
execution_contexts.push_back(ctx);
/* Execute the first node */
int result = 1;
if (! tree.empty())
{
- result = this->eval_block_node(0, io_chain_t(), block_type);
+ result = this->eval_block_node(0, io, block_type);
}
/* Clean up the execution context stack */
@@ -2652,8 +2652,9 @@ int parser_t::eval_block_node(node_offset_t node_idx, const io_chain_t &io, enum
/* Start it up */
const block_t * const start_current_block = current_block();
- this->push_block(new scope_block_t(block_type));
- int result = ctx->eval_node_at_offset(node_idx);
+ block_t *scope_block = new scope_block_t(block_type);
+ this->push_block(scope_block);
+ int result = ctx->eval_node_at_offset(node_idx, scope_block, io);
/* Clean up the block stack */
this->pop_block();
@@ -3138,7 +3139,7 @@ bool parser_use_ast(void)
env_var_t var = env_get_string(L"fish_new_parser");
if (var.missing_or_empty())
{
- return false;
+ return 10;
}
else
{