For example,
{ c-\mark \default }
produced an invalid music expression more or less indistinguishable from
{ \mark \default c }
Worse is that things like
{ c-\tweak color #red { g } }
also got accepted. While \tweak (and other music functions) may
indeed return either post-events or straight music expressions, there
should be checks in place that the usage corresponds to its type.
$$ = SCM_EOL;
}
| post_events post_event {
- unsmob_music ($2)->set_spot (@2);
- $$ = scm_cons ($2, $$);
+ if (unsmob_music ($2)) {
+ unsmob_music ($2)->set_spot (@2);
+ $$ = scm_cons ($2, $$);
+ }
}
;
}
| script_dir music_function_call_closed {
$$ = $2;
- if (!SCM_UNBNDP ($1))
+ if (!unsmob_music ($2)->is_mus_type ("post-event")) {
+ parser->parser_error (@2, _ ("post-event expected"));
+ $$ = SCM_UNSPECIFIED;
+ } else if (!SCM_UNBNDP ($1))
{
unsmob_music ($$)->set_property ("direction", $1);
}