]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/parser-ly-from-scheme.scm
Permits all positive and zero-length buildings in skylines (issue 3161)
[lilypond.git] / scm / parser-ly-from-scheme.scm
index 0e697d22bda657f3e970efa0281b01a0cd56360c..23978608a218e21812ddd482614bbcc9b50e5a0d 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 2004--2011  Nicolas Sceaux  <nicolas.sceaux@free.fr>
+;;;; Copyright (C) 2004--2012  Nicolas Sceaux  <nicolas.sceaux@free.fr>
 ;;;;           Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
@@ -49,6 +49,8 @@ from @var{port} and return the corresponding Scheme music expression.
                                                           (port-line port))
                                           (set-port-column! copycat
                                                             (port-column port))
+                                          (if (char=? (peek-char port) #\@)
+                                              (read-char copycat))
                                           (read copycat))))
                                   ;; kill unused lookahead, it has been
                                   ;; written out already
@@ -63,13 +65,17 @@ from @var{port} and return the corresponding Scheme music expression.
                                       (set! closures
                                             (cons `(cons ,p (lambda () ,expr))
                                                   closures)))))))))))
-    (define (embedded-lilypond parser lily-string filename line closures)
-      (let* ((clone (ly:parser-clone parser closures))
+    (define (embedded-lilypond parser lily-string filename line
+                               closures location)
+      (let* ((clone (ly:parser-clone parser closures location))
             (result (ly:parse-string-expression clone lily-string
                                                 filename line)))
        (if (ly:parser-has-error? clone)
            (ly:parser-error parser (_ "error in #{ ... #}")))
        result))
-    (list embedded-lilypond 'parser lily-string filename line (cons 'list (reverse! closures)))))
+    (list embedded-lilypond
+          'parser lily-string filename line
+          (cons 'list (reverse! closures))
+          'location)))
 
 (read-hash-extend #\{ read-lily-expression)