diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-11-29 22:51:32 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-11-29 22:51:32 -0800 |
commit | b56ac161e3194096de89208c608c5855a7b3f2db (patch) | |
tree | 963f2b0fde0afe0fa440a4085e3aefa8a1c5df93 | |
parent | 853f62fe5b462d241b5207e97a00f0f9109508dc (diff) | |
download | txr-b56ac161e3194096de89208c608c5855a7b3f2db.tar.gz txr-b56ac161e3194096de89208c608c5855a7b3f2db.tar.bz2 txr-b56ac161e3194096de89208c608c5855a7b3f2db.zip |
bugfix: awk elides loop despite begin/end clauses.
* share/txr/stdlib/awk.tl (awk): The macro must not
elide the processing loop if there are :begin-file,
:end-file or :end actions. All these actions must
be missing, not only the, cond-actions for that elision
to be valid.
-rw-r--r-- | share/txr/stdlib/awk.tl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/share/txr/stdlib/awk.tl b/share/txr/stdlib/awk.tl index 760c92ac..23db2403 100644 --- a/share/txr/stdlib/awk.tl +++ b/share/txr/stdlib/awk.tl @@ -331,7 +331,8 @@ p-actions-xform)))))) ,*awc.begin-actions (unwind-protect - ,(if awc.cond-actions + ,(if (or awc.cond-actions awc.begin-file-actions + awc.end-file-actions awc.end-actions) ^(qref ,aws-sym (loop ,awk-fun ,(if awc.begin-file-actions awk-begf-fun) |