Hi Harm,
thanks for your feedback.
Your example let me notice that I forgot that R (upper case) is a note
as well, so I've updated the note_duration regexp.
Il 02/01/2012 15:58, Thomas Morley ha scritto:
I tested a file with a large scheme-definition.
In the attached file you may notice some inconsequences:
1. The scheme-functions of "IR 4. Scheme functions" aren't
high-lighted consistent:
ly:grob? isn't colored and "ly:" never.
2. In #(define (center-note-column grob) (let* ...
Some of the defined variables are colored some not.
Sory, that I can't do more than testing.
Scheme is the hardest part.
I don't have a solution for it. The problem is the conflict between
single and multiline blocks. I must put the multiline regexp before the
single line regexp, because the first has precedence. But I also need to
distinguish them: they cannot have the same start delimiter.
Single line blocks can be:
\once \override Tie #'staff-position = #3.5
tempoWholesPerMinute = #(ly:make-moment 120 4)
tagline = \markup { \override #'(box-padding . 1.0) }
Start: #' or #(
End: ) or end of line
In your example the multiline blocks start with #( so the single line
regexp applies.
I might define #( as a multiline start delimiter, but then the single
line instance (see tempoWholesPerMinute above) would break everything.
Also, tracking the end of that big block is not easy at all.
I think I've covered the most frequent and basic uses of scheme inside a
lilypond file. Large scheme definitions are quite difficult for me.
If any regexp guru has a good idea, please share it here.
HTH,
Harm
P.S. Great work so far!
Thanks!
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user