diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | txr.1 | 11 |
2 files changed, 11 insertions, 2 deletions
@@ -6,6 +6,8 @@ * filter.h (upcase_k, downcase_k, fun_k): Declared. + * txr.1: Updated. + 2011-10-25 Kaz Kylheku <kaz@kylheku.com> * match.c (v_bind): Use sem_error to throw errors with line number @@ -3060,14 +3060,21 @@ This function binds the out parameter to "bar" if the in parameter is "foo", otherwise it binds the out parameter to a copy of the in parameter. This is a simple filter. -To use the filter, use the syntax (fun foo_to_bar) in place of a filter name. +To use the filter, use the syntax (:fun foo_to_bar) in place of a filter name. For instance in the bind directive: - @(bind "foo" "bar" :lfilt (fun foo_to_bar)) + @(bind "foo" "bar" :lfilt (:fun foo_to_bar)) The above should succeed since the left side is filtered from "foo" to "bar", so that there is a match. +Of course, function filters can be used in a chain: + + @(output :filter (:downcase (:fun foo_to_bar) :upcase)) + ... + @(end) + + .SS The Deffilter Directive The deffilter directive allows a query to define a custom filter, which |