Hi,

currently the following works because it hacks around a number of
internals in parser-ly-from-scheme.scm:

zap = #(define-music-function (parser location str) (string?)
                               #{ }
                               parseStringResult = ^\markup { $str }
                               { #})
\new Voice { \zap #"pling" r4 c_\zap #"plong" }

This is not pretty.  I'd like to get there using just
#{ ^\markup { $str } #}

And I would want #{ ... #} to work for other entities valid in
assignments, without losing its current way of dealing with simple
sequential music.

The idea would be to have read-lily-expression push a special start
symbol into the parser that would throw it into a mode suitable for
parsing a #{ #} spec (which is better delimited than the argument for an
assignment).

How to get that start symbol in?  Optional argument for the parser?
Explicit call pushing the token?

Suggestions?

-- 
David Kastrup


_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to