diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-09-12 05:44:32 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-09-12 05:44:32 -0700 |
commit | 46f53f9397c625a3e508c083416ce0c6d943a920 (patch) | |
tree | 12ddd2148093bc84f181e1519c8652fb295e27ac /share | |
parent | 0528f634b395b5ee3bd78766e5530ba1a9321e1e (diff) | |
download | txr-46f53f9397c625a3e508c083416ce0c6d943a920.tar.gz txr-46f53f9397c625a3e508c083416ce0c6d943a920.tar.bz2 txr-46f53f9397c625a3e508c083416ce0c6d943a920.zip |
awk macro: new local macros ff and mf.
* share/txr/stdlib/awk.tl (sys:awk-let): New
local macros.
* txr.1: Documented.
Diffstat (limited to 'share')
-rw-r--r-- | share/txr/stdlib/awk.tl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/share/txr/stdlib/awk.tl b/share/txr/stdlib/awk.tl index dabff1fc..3c92286a 100644 --- a/share/txr/stdlib/awk.tl +++ b/share/txr/stdlib/awk.tl @@ -176,7 +176,13 @@ (set ,flag-new nil)) (or (set flag ,flag-new) ,flag-old))) (qref ,awc rng-exprs)) - rng-temp))) + rng-temp)) + (ff (. opip-args) + ^(symacrolet ((f (rslot ,',aws-sym 'fields 'f-to-rec))) + (set f [(opip ,*opip-args) f]))) + (mf (. opip-args) + ^(symacrolet ((f (rslot ,',aws-sym 'fields 'f-to-rec))) + (set f (mapcar (opip ,*opip-args) f))))) ,*body))) (defmacro awk (:env e . clauses) |