fish-shell/src/parse_grammar_elements.inc
ridiculousfish 357d3b8c6d Rework 'and' and 'or' to be "job decorators"
This promotes "and" and "or" from a type of statement to "job
decorators," as a possible prefix on a job. The point is to rationalize
how they interact with && and ||.

In the new world 'and' and 'or' apply to a entire job conjunction, i.e.
they have "lower precedence." Example:

if [ $age -ge 0 ] && [ $age -le 18 ]
   or [ $age -ge 75 ] && [ $age -le 100 ]
   echo "Child or senior"
end
2018-03-05 13:41:36 -08:00

35 lines
732 B
PHP

// Define ELEM before including this file.
ELEM(job_list)
ELEM(job)
ELEM(job_decorator)
ELEM(job_conjunction)
ELEM(job_conjunction_continuation)
ELEM(job_continuation)
ELEM(statement)
ELEM(if_statement)
ELEM(if_clause)
ELEM(else_clause)
ELEM(else_continuation)
ELEM(switch_statement)
ELEM(case_item_list)
ELEM(case_item)
ELEM(block_statement)
ELEM(block_header)
ELEM(for_header)
ELEM(while_header)
ELEM(begin_header)
ELEM(function_header)
ELEM(not_statement)
ELEM(andor_job_list)
ELEM(decorated_statement)
ELEM(plain_statement)
ELEM(argument_list)
ELEM(arguments_or_redirections_list)
ELEM(argument)
ELEM(redirection)
ELEM(optional_background)
ELEM(optional_newlines)
ELEM(end_command)
ELEM(freestanding_argument_list)
#undef ELEM