summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-10-04 04:21:57 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-10-04 04:21:57 -0700
commit20758a37854c852c5a6574ced48bb0aca9417132 (patch)
treef30bf9b7aee1b45b689103f3609f1ec44f9f6809 /share
parentb74633f86d69cf1aabebe0b976d695b7a61bddc6 (diff)
downloadtxr-20758a37854c852c5a6574ced48bb0aca9417132.tar.gz
txr-20758a37854c852c5a6574ced48bb0aca9417132.tar.bz2
txr-20758a37854c852c5a6574ced48bb0aca9417132.zip
New awk clauses :set and :set-file.
* share/txr/stdlib/awk.tl (sys:awk-expander): Recognize :set and :set-file cases. * txr.1: Documented :set and :set-file, replacing some :begin uses with :set in the examples.
Diffstat (limited to 'share')
-rw-r--r--share/txr/stdlib/awk.tl2
1 files changed, 2 insertions, 0 deletions
diff --git a/share/txr/stdlib/awk.tl b/share/txr/stdlib/awk.tl
index 47028802..84688768 100644
--- a/share/txr/stdlib/awk.tl
+++ b/share/txr/stdlib/awk.tl
@@ -190,8 +190,10 @@
(set awc.name (car actions)))
(:let (push actions awc.lets))
(:begin (push actions awc.begin-actions))
+ (:set (push ^((set ,*actions)) awc.begin-actions))
(:end (push actions awc.end-actions))
(:begin-file (push actions awc.begin-file-actions))
+ (:set-file (push ^((set ,*actions)) awc.begin-actions))
(:end-file (push actions awc.end-file-actions))
(t (push (if actions
cl