diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-04-08 18:04:44 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-04-08 18:04:44 -0700 |
commit | 259b59ddd679f19744a03218357e51b1d1eddc5a (patch) | |
tree | e06b88e5de1748e2127b7aa7f61266753c91b29a /parser.h | |
parent | 52ef6223a9c84076bf19728028a77d9850d2c088 (diff) | |
download | txr-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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 *); |