diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-12-26 20:30:22 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-12-26 20:30:22 -0800 |
commit | 4500f9d53feea9205c4c30743bb99e3a5f15703d (patch) | |
tree | ba0e308452e3bb8f3375a93ab23957e17421487e /tests/010/span-var.txr | |
parent | d1caae1ac6f393d0bc8cbcf62804dbac0033d133 (diff) | |
download | txr-4500f9d53feea9205c4c30743bb99e3a5f15703d.tar.gz txr-4500f9d53feea9205c4c30743bb99e3a5f15703d.tar.bz2 txr-4500f9d53feea9205c4c30743bb99e3a5f15703d.zip |
txr: allow variable to span vertical function.
* match.c (v_var_compat, v_var): New static functions.
(match_files): No longer recognize v_var specially; it is now
handled via vertical table.
(dir_tables_init): Register a vertical sys:var directive also
via v_var function.
(match_compat_fixup): New function.
* txr.c (compat): Call match_compat_fixup.
* tests/010/span-var.txr: New file.
* txr.1: Documented.
Diffstat (limited to 'tests/010/span-var.txr')
-rw-r--r-- | tests/010/span-var.txr | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/010/span-var.txr b/tests/010/span-var.txr new file mode 100644 index 00000000..5f5faa6c --- /dev/null +++ b/tests/010/span-var.txr @@ -0,0 +1,15 @@ +@(define fun (x y)) +@(bind x "x") +@y +@y +@y +@(end) +@(next :list '("a" "a" "a" "b" "c")) +@{z (fun x "a")} +@(require (equal x "x")) +@(require (equal z '("a" "a" "a"))) +@(define fun2 (x y))@(bind x "x")@y@(end) +@(next :string "ab") +@{w (fun2 x "a")}@y +@(require (equal w "a")) +@(require (equal y "b")) |