summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kastrup <dak@gnu.org>2016-06-28 10:19:27 +0200
committerDavid Kastrup <dak@gnu.org>2016-07-07 17:57:28 +0200
commit3571a1daacf4e1266a215171204f0a6df752c5cd (patch)
treef1f17a44f83c769bac7a56c3a752c208f2baa4a9
parentd5400b90987288185c5cbff9257c3a215ea84811 (diff)
Issue 4908/3: Admit \header-like expressions in \header
-rw-r--r--lily/parser.yy11
1 files 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"));
}
;