s/formals/formal/g
This commit is contained in:
parent
6cf4fe942a
commit
e08ec23a9f
18
src/macro.c
18
src/macro.c
|
@ -359,19 +359,19 @@ static pic_value
|
||||||
macroexpand_define(pic_state *pic, pic_value expr, struct pic_senv *senv, struct pic_dict *cxt)
|
macroexpand_define(pic_state *pic, pic_value expr, struct pic_senv *senv, struct pic_dict *cxt)
|
||||||
{
|
{
|
||||||
pic_sym sym;
|
pic_sym sym;
|
||||||
pic_value formals;
|
pic_value formal;
|
||||||
|
|
||||||
if (pic_length(pic, expr) < 2) {
|
if (pic_length(pic, expr) < 2) {
|
||||||
pic_error(pic, "syntax error");
|
pic_error(pic, "syntax error");
|
||||||
}
|
}
|
||||||
|
|
||||||
formals = pic_cadr(pic, expr);
|
formal = pic_cadr(pic, expr);
|
||||||
if (pic_pair_p(formals)) {
|
if (pic_pair_p(formal)) {
|
||||||
struct pic_senv *in = push_scope(pic, pic_cdr(pic, formals), senv, cxt);
|
struct pic_senv *in = push_scope(pic, pic_cdr(pic, formal), senv, cxt);
|
||||||
pic_value a;
|
pic_value a;
|
||||||
|
|
||||||
/* defined symbol */
|
/* defined symbol */
|
||||||
a = pic_car(pic, formals);
|
a = pic_car(pic, formal);
|
||||||
if (! pic_sym_p(a)) {
|
if (! pic_sym_p(a)) {
|
||||||
a = macroexpand(pic, a, senv, cxt);
|
a = macroexpand(pic, a, senv, cxt);
|
||||||
}
|
}
|
||||||
|
@ -390,13 +390,13 @@ macroexpand_define(pic_state *pic, pic_value expr, struct pic_senv *senv, struct
|
||||||
macroexpand_list(pic, pic_cddr(pic, expr), in, cxt)));
|
macroexpand_list(pic, pic_cddr(pic, expr), in, cxt)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! pic_sym_p(formals)) {
|
if (! pic_sym_p(formal)) {
|
||||||
formals = macroexpand(pic, formals, senv, cxt);
|
formal = macroexpand(pic, formal, senv, cxt);
|
||||||
}
|
}
|
||||||
if (! pic_sym_p(formals)) {
|
if (! pic_sym_p(formal)) {
|
||||||
pic_error(pic, "binding to non-symbol object");
|
pic_error(pic, "binding to non-symbol object");
|
||||||
}
|
}
|
||||||
sym = pic_sym(formals);
|
sym = pic_sym(formal);
|
||||||
if (! pic_find_rename(pic, senv, sym, NULL)) {
|
if (! pic_find_rename(pic, senv, sym, NULL)) {
|
||||||
pic_add_rename(pic, senv, sym);
|
pic_add_rename(pic, senv, sym);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue