summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-04-02 06:25:02 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-04-02 06:25:02 -0700
commitdead4e05c9ea34c79047eba84949ec366a8ba6b2 (patch)
treef02f7c2625d226b2f49116d17618d9923d43fd9c /eval.c
parentedd182e778e116f2c2c62fbc09102372b0c03500 (diff)
downloadtxr-dead4e05c9ea34c79047eba84949ec366a8ba6b2.tar.gz
txr-dead4e05c9ea34c79047eba84949ec366a8ba6b2.tar.bz2
txr-dead4e05c9ea34c79047eba84949ec366a8ba6b2.zip
New function: txr-parse.
txr-parse provides a way for Lisp code to programmatically parse the TXR language and obtain the Lisp represenation. This has hitherto not been available. * eval.c (eval_init): Register txr-parse intrinsic. * parser.c (txr_parse): New function. * parser.h (txr_parse): Declared.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 805805b3..d9dd0b3d 100644
--- a/eval.c
+++ b/eval.c
@@ -6623,6 +6623,7 @@ void eval_init(void)
reg_fun(intern(lit("lisp-parse"), user_package), func_n5o(nread, 0));
reg_fun(intern(lit("read"), user_package), func_n5o(nread, 0));
reg_fun(intern(lit("iread"), user_package), func_n5o(iread, 0));
+ reg_fun(intern(lit("txr-parse"), user_package), func_n4o(txr_parse, 0));
reg_fun(intern(lit("load"), user_package), func_n1(load));
reg_var(load_path_s, nil);
reg_symacro(intern(lit("self-load-path"), user_package), load_path_s);