diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-04-02 06:25:02 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-04-02 06:25:02 -0700 |
commit | dead4e05c9ea34c79047eba84949ec366a8ba6b2 (patch) | |
tree | f02f7c2625d226b2f49116d17618d9923d43fd9c /eval.c | |
parent | edd182e778e116f2c2c62fbc09102372b0c03500 (diff) | |
download | txr-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.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); |