Add detection of eval to the parser

While `eval` is still a function, this paves the way for changing that
in the future, and lets the proc/exec functions detect when an eval is
used to allow/disallow certain behaviors and optimizations.
This commit is contained in:
Mahmoud Al-Qudsi
2019-03-28 19:55:23 -05:00
parent 25dd22242d
commit 0bda853dc7
6 changed files with 23 additions and 3 deletions

View File

@@ -944,6 +944,7 @@ static bool exec_process_in_job(parser_t &parser, process_t *p, std::shared_ptr<
// Execute the process.
p->check_generations_before_launch();
switch (p->type) {
case process_type_t::eval: /* so long as `eval` is a function */
case process_type_t::function:
case process_type_t::block_node: {
// Allow buffering unless this is a deferred run. If deferred, then processes after us