Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1808)

Unified Diff: scm/parser-ly-from-scheme.scm

Issue 557330043: Parse inline scheme using per-expression port (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lily/source-file.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scm/parser-ly-from-scheme.scm
diff --git a/scm/parser-ly-from-scheme.scm b/scm/parser-ly-from-scheme.scm
index 1bd8ac70da2a6cc2e38f0f513f9ff317af8bab47..f0877f897f0a1cf352f0b1d2052cf87782f047de 100644
--- a/scm/parser-ly-from-scheme.scm
+++ b/scm/parser-ly-from-scheme.scm
@@ -17,6 +17,9 @@
;;;; along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
(define (read-lily-expression-internal lily-string filename line closures)
+ "Direct the lilypond parser to parse LILY-STRING, using FILENAME,
+LINE for diagnostics. CLOSURES holds an alist of (BYTE-OFFSET . DATA),
+representing embedded Scheme in LILY-STRING"
(let* ((clone (ly:parser-clone closures (*location*)))
(result (ly:parse-string-expression clone lily-string filename line)))
(if (ly:parser-has-error? clone)
@@ -30,6 +33,10 @@ from @var{port} and return the corresponding Scheme music expression.
(let* ((closures '())
(filename (port-filename port))
(line (port-line port))
+
+ ;; TODO: this creates ports (make-soft-port, call-with-output-string).
+ ;; we should clarify what input-encoding these ports use. It's also likely
+ ;; that embedded Scheme in #{ #} is broken when mixed with UTF-8.
(lily-string (call-with-output-string
(lambda (out)
(define (copy-char)
« no previous file with comments | « lily/source-file.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b