]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4908/3: Admit \header-like expressions in \header
authorDavid Kastrup <dak@gnu.org>
Tue, 28 Jun 2016 08:19:27 +0000 (10:19 +0200)
committerDavid Kastrup <dak@gnu.org>
Thu, 7 Jul 2016 15:57:28 +0000 (17:57 +0200)
lily/parser.yy

index fa729ad9efeedfbd48317a69dd8530dc7c707e5b..550e9ea48770941d7e78984838a6dbdaf6d60a8e 100644 (file)
@@ -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"));
        }
        ;