X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fparse-scm.cc;h=44b99db2adbe51f0c6c34e2ab521c5d23a2cbfac;hb=b2ee405188663de7ce5e0e79af12f06726f511f8;hp=6dcf54ae92f10f7601033c5924998e3b20b06ff8;hpb=0c61221b46addec50e2406e04af44a7d460443d4;p=lilypond.git diff --git a/lily/parse-scm.cc b/lily/parse-scm.cc index 6dcf54ae92..44b99db2ad 100644 --- a/lily/parse-scm.cc +++ b/lily/parse-scm.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2004--2011 Han-Wen Nienhuys + Copyright (C) 2004--2012 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -47,9 +47,14 @@ internal_ly_parse_scm (Parse_start *ps) scm_set_port_line_x (port, scm_from_int (ps->start_location_.line_number () - 1)); scm_set_port_column_x (port, scm_from_int (ps->start_location_.column_number () - 1)); - SCM form = scm_read (port); + bool multiple = ly_is_equal (scm_peek_char (port), SCM_MAKE_CHAR ('@')); + + if (multiple) + (void) scm_read_char (port); + SCM form = scm_read (port); SCM to = scm_ftell (port); + ps->nchars = scm_to_int (to) - scm_to_int (from); if (!SCM_EOF_OBJECT_P (form)) @@ -62,6 +67,10 @@ internal_ly_parse_scm (Parse_start *ps) // Replace form with a call to previously compiled closure form = scm_list_1 (c); } + if (multiple) + form = scm_list_3 (ly_symbol2scm ("apply"), + ly_symbol2scm ("values"), + form); return scm_cons (form, make_input (ps->start_location_)); } @@ -171,4 +180,3 @@ ly_eval_scm (SCM form, Input i, bool safe, Lily_parser *parser) scm_remember_upto_here_1 (form); return ans; } -