From e80bf02da133a03d26f648305e1d7ced532b3481 Mon Sep 17 00:00:00 2001 From: Erik Sandberg Date: Tue, 27 Jun 2006 20:22:51 +0000 Subject: [PATCH] * lily/parser.yy: Wrap non-post-events in EventChords before assigning them to identifiers. --- ChangeLog | 5 +++++ lily/parser.yy | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e912fbf8ae..58f08098b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-06-27 Erik Sandberg + + * lily/parser.yy: Wrap non-post-events in EventChords before + assigning them to identifiers. + 2006-06-27 Mats Bengtsson * lily/bar-line.cc (compound_barline): Fix parenthesis error, diff --git a/lily/parser.yy b/lily/parser.yy index 1c39e1c060..08c0e1e742 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -579,7 +579,16 @@ identifier_init: $$ = $1; } | music { - $$ = $1; + /* Hack: Create event-chord around standalone events. + Prevents the identifier from being interpreted as a post-event. */ + Music *mus = unsmob_music ($1); + bool is_event = mus && + (scm_memq (ly_symbol2scm ("event"), mus->get_property ("types")) + != SCM_BOOL_F); + if (!is_event) + $$ = $1; + else + $$ = MAKE_SYNTAX ("event-chord", @$, scm_list_1 ($1)); } | post_event { $$ = $1; -- 2.39.5