summaryrefslogtreecommitdiffstats
path: root/genman.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-09-10 21:21:05 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-09-10 21:21:05 -0700
commit685ea1dd078bb9861a86b3af5d8b6d509e4fa982 (patch)
treed9155e8182419b5ad174a3a713b45546744f87d0 /genman.txr
parentb26fd2a683aba1d25864ae38629fe2eae85fa3fe (diff)
downloadtxr-685ea1dd078bb9861a86b3af5d8b6d509e4fa982.tar.gz
txr-685ea1dd078bb9861a86b3af5d8b6d509e4fa982.tar.bz2
txr-685ea1dd078bb9861a86b3af5d8b6d509e4fa982.zip
awk macro: implement :begin-file and :end-file.
* share/txr/stdlib/awk.tl (sys:awk-compile-time): New slots, begin-file-actions and end-file-actions. (sys:awk-state loop): Take two additional functional arguments for the begin file and end file actions, and do the calls in the right places. unwind-protect triggers the end file function. (sys:awk-expander): Parse out :begin-file and :end-file actions. (awk): Generate lambdas for begin-file and end-file actions, if they are defined. Pass these to the loop method. The code is refactored here to do one big sys:awk-let around everything. * txr.1: Documented :begin-file and :end-file, revising the :begin and :end documentation in the process.
Diffstat (limited to 'genman.txr')
0 files changed, 0 insertions, 0 deletions