Add support for ! as an analog to 'not'

! and not are effectively interchangeable now.
Mark them both as operators for syntax highlighting.
This commit is contained in:
ridiculousfish
2018-03-04 16:06:32 -08:00
parent f83742d579
commit c7f16439bf
10 changed files with 70 additions and 16 deletions

View File

@@ -924,7 +924,8 @@ bool parse_execution_context_t::determine_io_chain(tnode_t<g::arguments_or_redir
parse_execution_result_t parse_execution_context_t::populate_not_process(
job_t *job, process_t *proc, tnode_t<g::not_statement> not_statement) {
job->set_flag(JOB_NEGATE, !job->get_flag(JOB_NEGATE));
return this->populate_job_process(job, proc, not_statement.child<1>());
return this->populate_job_process(job, proc,
not_statement.require_get_child<g::statement, 1>());
}
template <typename Type>