From: David Kastrup Date: Tue, 28 Jun 2016 08:19:27 +0000 (+0200) Subject: Issue 4908/3: Admit \header-like expressions in \header X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3571a1daacf4e1266a215171204f0a6df752c5cd;p=lilypond.git Issue 4908/3: Admit \header-like expressions in \header --- diff --git a/lily/parser.yy b/lily/parser.yy index fa729ad9ef..550e9ea487 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -639,8 +639,15 @@ lilypond_header_body: | lilypond_header_body assignment { } - | lilypond_header_body embedded_scm { - + | lilypond_header_body SCM_TOKEN { + // Evaluate and ignore #xxx, as opposed to \xxx + parser->lexer_->eval_scm_token ($2, @2); + } + | lilypond_header_body embedded_scm_active { + if (ly_is_module ($2)) + ly_module_copy (scm_current_module (), $2); + else if (!scm_is_eq ($2, SCM_UNSPECIFIED)) + parser->parser_error (@2, _("bad expression type")); } ;