]> git.donarmstrong.com Git - lilypond.git/commit
Issue 3471: Allow decimal fractions with non-empty parts before and after '.' in...
authorDavid Kastrup <dak@gnu.org>
Mon, 22 Jul 2013 17:11:59 +0000 (19:11 +0200)
committerDavid Kastrup <dak@gnu.org>
Sat, 27 Jul 2013 09:13:35 +0000 (11:13 +0200)
commit680df85187d0f3862b1ef1cf7a14f8ad7b7f0ee9
tree70fb83dc569640b5c5e340dcf9e79e540a4ae44a
parentee89ee2c8ee328ec261b822aa9e260c9d623c086
Issue 3471: Allow decimal fractions with non-empty parts before and after '.' in music

This permits writing things like

mkMove = #(define-music-function
        (parser location x y)
        ( number? number? )
        #{ \once \override TextScript #'extra-offset = #(cons x y)
        #})

{
\mkMove 4.4 -3.3
c1^"XY"
}

Since integers are accepted in this kind of usage, not accepting
floating point numbers appears inconsistent.

While in INITIAL mode like inside of layout blocks real numbers can
be written like 4. or -.3 for historic reasons, permitting this inside
of music could easily lead to confusion with durations or
articulations, so those spellings remain invalid in music modes.

Decimal fractions are also not accepted in \chordmode since this would
preclude chord entry like c:13.11^3.7 and similar.
lily/lexer.ll