summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-02-16 18:56:39 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-02-16 18:56:39 -0800
commit8c299f44b94d4462147b9e3cb782c52c3669a1e5 (patch)
treef1ea94cd5de6f808696c1bb168d99b7c8766902c /eval.c
parentdcd14af875e74e92379031076d48c526b57a06bf (diff)
downloadtxr-8c299f44b94d4462147b9e3cb782c52c3669a1e5.tar.gz
txr-8c299f44b94d4462147b9e3cb782c52c3669a1e5.tar.bz2
txr-8c299f44b94d4462147b9e3cb782c52c3669a1e5.zip
* eval.c (eval_init): Register match-fun.
* match.c (v_do): Store match context. (match_fun): New function. * match.h (match_fun): Declared. * stream.c (streamp): New function. * stream.h (streamp): Declared. * txr.1: Stub section for match-fun. * txr.vim: Highlight match-fun.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 4aa1019b..3375b15b 100644
--- a/eval.c
+++ b/eval.c
@@ -2228,6 +2228,8 @@ void eval_init(void)
reg_fun(intern(lit("throwf"), user_package), func_n2v(uw_throwfv));
reg_fun(error_s, func_n1v(uw_errorfv));
+ reg_fun(intern(lit("match-fun"), user_package), func_n4(match_fun));
+
eval_error_s = intern(lit("eval-error"), user_package);
uw_register_subtype(eval_error_s, error_s);
}