From 3571a1daacf4e1266a215171204f0a6df752c5cd Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Tue, 28 Jun 2016 10:19:27 +0200 Subject: [PATCH] Issue 4908/3: Admit \header-like expressions in \header --- lily/parser.yy | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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")); } ; -- 2.39.2