summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-02-13 17:51:00 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-02-13 17:51:00 -0800
commit28020fb827625d41c1252c9e34690114607506ec (patch)
tree0872144345372cb1e9a789d2af8683bafd1a3e49
parentb9b5bc1bb557657de2848252ca06f1c68138e397 (diff)
downloadtxr-28020fb827625d41c1252c9e34690114607506ec.tar.gz
txr-28020fb827625d41c1252c9e34690114607506ec.tar.bz2
txr-28020fb827625d41c1252c9e34690114607506ec.zip
Support horizontal form of @(throw).
* match.c (dir_tables_init): Wire throw_s into horizontal dispatch table via hv_trampoline. * txr.1: Documented.
-rw-r--r--match.c1
-rw-r--r--txr.114
2 files changed, 15 insertions, 0 deletions
diff --git a/match.c b/match.c
index 0a819841..46ca1559 100644
--- a/match.c
+++ b/match.c
@@ -4580,6 +4580,7 @@ static void dir_tables_init(void)
sethash(h_directive_table, choose_s, cptr(coerce(mem_t *, h_parallel)));
sethash(h_directive_table, trailer_s, cptr(coerce(mem_t *, h_trailer)));
sethash(h_directive_table, define_s, cptr(coerce(mem_t *, h_define)));
+ sethash(h_directive_table, throw_s, cptr(coerce(mem_t *, hv_trampoline)));
sethash(h_directive_table, eol_s, cptr(coerce(mem_t *, h_eol)));
sethash(h_directive_table, chr_s, cptr(coerce(mem_t *, h_chr)));
sethash(h_directive_table, do_s, cptr(coerce(mem_t *, h_do)));
diff --git a/txr.1 b/txr.1
index d78712f0..6daca213 100644
--- a/txr.1
+++ b/txr.1
@@ -9688,6 +9688,20 @@ can take
whatever value the corresponding throw argument provides, so it ends up with
.strn lc .
+There is a horizontal form of
+.codn throw .
+For instance:
+
+.cblk
+ abc@(throw e 1)
+.cble
+
+throws exception
+.code e
+if
+.code abc
+matches.
+
.dir defex
The