summaryrefslogtreecommitdiffstats
path: root/parser.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-04-08 18:04:44 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-04-08 18:04:44 -0700
commit259b59ddd679f19744a03218357e51b1d1eddc5a (patch)
treee06b88e5de1748e2127b7aa7f61266753c91b29a /parser.h
parent52ef6223a9c84076bf19728028a77d9850d2c088 (diff)
downloadtxr-259b59ddd679f19744a03218357e51b1d1eddc5a.tar.gz
txr-259b59ddd679f19744a03218357e51b1d1eddc5a.tar.bz2
txr-259b59ddd679f19744a03218357e51b1d1eddc5a.zip
repl: groundwork for recursive listener invocation.
* parser.c (lino_ctx, repl_level): New static variable. (repl): Increment repl_level on entry and decrement on exit. On the initial entry, allocate the lino_t object, storing it in the new static variable. Free it on outermost exit. The number of > characters in the prompt indicates the nesting level. The function now takes an environment parameter, which is applied to the evaluation of the input form. The intent is to be able to supply symbol macros which expand to function calls implementing debugger commands. (parser_init): Register sys:repl intrinsic. * parser.h (repl): Declaration updated. * txr.c (txr_main): Pass nil environment parameter to repl
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser.h b/parser.h
index a0fd7e73..246832ab 100644
--- a/parser.h
+++ b/parser.h
@@ -124,7 +124,7 @@ val iread(val source_in, val error_stream, val error_return_val,
val read_eval_stream(val self, val stream, val error_stream);
val read_compiled_file(val self, val stream, val error_stream);
#if HAVE_TERMIOS
-val repl(val bindings, val in_stream, val out_stream);
+val repl(val bindings, val in_stream, val out_stream, val env);
#endif
void parser_common_init(parser_t *);
void parser_cleanup(parser_t *);