summaryrefslogtreecommitdiffstats
path: root/parser.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-12-19 19:32:28 -0800
committerKaz Kylheku <kaz@kylheku.com>2023-12-19 19:32:28 -0800
commitdaf60d254b0f47fcdd2dec4046a4e97476da9eee (patch)
treea7340760fa611c16ec048f4a35bbab0951c90845 /parser.h
parent5253d51f5139008cf86c24235e394b409fd82808 (diff)
downloadtxr-daf60d254b0f47fcdd2dec4046a4e97476da9eee.tar.gz
txr-daf60d254b0f47fcdd2dec4046a4e97476da9eee.tar.bz2
txr-daf60d254b0f47fcdd2dec4046a4e97476da9eee.zip
New functions: read-objects, file-get-objects, ...
* parser.c (read_objects_common): New static function, formed from read_objects_from-string. (read_objects_from_string): Now wrapper for read_objects_common. (read_objects): New function. * parser.h (read_objects): Declared. * eval.c (eval_init): Register read-objects intrinsic. * autoload.c (getput_set_entries): Add three new symbols: file-get-objects, file-put-objects and file-append-objects. * stdlib/getput.tl (put-objects): New system function. (file-get-objects, file-put-objects, file-append-objects): New functions. * txr.1: Documented. * tests/018/getput.tl: New file.
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/parser.h b/parser.h
index fe05b448..09939fca 100644
--- a/parser.h
+++ b/parser.h
@@ -139,6 +139,8 @@ val read_eval_stream(val self, val stream, val error_stream);
val read_compiled_file(val self, val stream, val error_stream);
val read_objects_from_string(val string, val error_stream,
val error_return_val, val name_in);
+val read_objects(val source_in, val error_stream, val error_return_val,
+ val name_in, val lineno_in);
val txr_parse(val source, val error_stream,
val error_return_val, val name_in);
val repl(val bindings, val in_stream, val out_stream, val env);