summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-07-07 23:43:08 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-07-07 23:43:08 -0700
commitfa3c90eb3ac48abd8bb9065884fe15523a864766 (patch)
treec96e5c01207325af768cba0032f3a47184d15f20 /lib.c
parentcb31c444c367ffe950cffae7adca5a3ec024620a (diff)
downloadtxr-fa3c90eb3ac48abd8bb9065884fe15523a864766.tar.gz
txr-fa3c90eb3ac48abd8bb9065884fe15523a864766.tar.bz2
txr-fa3c90eb3ac48abd8bb9065884fe15523a864766.zip
txr: support @(if)/@(elif)/@(else) in @(output).
This turns out to be way easier than I thought. * match.c (do_output_if): New static function. (do_output): Handle if via do_output_if. * parser.y (out_if_clause, out_elif_clauses_opt, out_else_clause_opt): New nonterminal symbols and grammar rules. (out_clause): Now produces out_if_clause. (not_a_clause): Remove ELIF and ELSE; these entries here cause conflicts now. Here, continue to recognize the Lisp if, which is distinguished by having at least two arguments. out_if_clause matches only a one-argument if, and a no-argumeent one that is diagnosed as erroneous. * txr.1: Documented.
Diffstat (limited to 'lib.c')
0 files changed, 0 insertions, 0 deletions