push_extra_token (EXPECT_NO_MORE_ARGS);
for (s = scm_cdr (s); scm_is_pair (s); s = scm_cdr (s))
{
+ SCM optional = SCM_UNDEFINED;
cs = scm_car (s);
+
+ if (scm_is_pair (cs))
+ {
+ optional = SCM_CDR (cs);
+ cs = SCM_CAR (cs);
+ }
if (cs == ly_music_p_proc)
push_extra_token (EXPECT_MUSIC);
push_extra_token (EXPECT_MARKUP);
else if (ly_is_procedure (cs))
push_extra_token (EXPECT_SCM);
- else programming_error ("Function parameter without type-checking predicate");
+ else
+ {
+ programming_error ("Function parameter without type-checking predicate");
+ continue;
+ }
+ if (!scm_is_eq (optional, SCM_UNDEFINED))
+ push_extra_token (EXPECT_OPTIONAL, optional);
}
return funtype;
}