mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-14 05:12:38 -08:00
Merge branch 'backquote-reader-fix' into 'develop'
reader: fix backquote reader if the input is incomplete This makes behaviour consistent with single-quote reader. Fixes #159. Signed-off-by: Daniel Kochmański <daniel@turtleware.eu> See merge request !12
This commit is contained in:
commit
b56eb93532
1 changed files with 4 additions and 2 deletions
|
|
@ -483,12 +483,14 @@ cl_object backquote_reader(cl_object in, cl_object c)
|
|||
const cl_env_ptr the_env = ecl_process_env();
|
||||
cl_fixnum backq_level = ecl_fixnum(ECL_SYM_VAL(the_env, @'si::*backq-level*'));
|
||||
ECL_SETQ(the_env, @'si::*backq-level*', ecl_make_fixnum(backq_level+1));
|
||||
in = ecl_read_object(in);
|
||||
c = ecl_read_object(in);
|
||||
ECL_SETQ(the_env, @'si::*backq-level*', ecl_make_fixnum(backq_level));
|
||||
unlikely_if (c == OBJNULL)
|
||||
FEend_of_file(in);
|
||||
#if 0
|
||||
@(return cl_macroexpand_1(2, cl_list(2, @'si::quasiquote', in), ECL_NIL));
|
||||
#else
|
||||
@(return cl_list(2,@'si::quasiquote',in))
|
||||
@(return cl_list(2,@'si::quasiquote',c))
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue