OLD | NEW |
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2004--2020 Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 Copyright (C) 2004--2020 Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 | 5 |
6 LilyPond is free software: you can redistribute it and/or modify | 6 LilyPond is free software: you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
8 the Free Software Foundation, either version 3 of the License, or | 8 the Free Software Foundation, either version 3 of the License, or |
9 (at your option) any later version. | 9 (at your option) any later version. |
10 | 10 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 { | 113 { |
114 return internal_ly_eval_scm (static_cast<Parse_start *> (p)); | 114 return internal_ly_eval_scm (static_cast<Parse_start *> (p)); |
115 } | 115 } |
116 | 116 |
117 SCM | 117 SCM |
118 parse_handler (void *data, SCM /*tag*/, SCM args) | 118 parse_handler (void *data, SCM /*tag*/, SCM args) |
119 { | 119 { |
120 Parse_start *ps = (Parse_start *) data; | 120 Parse_start *ps = (Parse_start *) data; |
121 | 121 |
122 ps->location_.non_fatal_error | 122 ps->location_.non_fatal_error |
123 (_ ("GUILE signaled an error for the expression beginning here")); | 123 (_ ("GUILE signaled an error for the expression beginning here")); |
124 | 124 |
125 if (scm_ilength (args) > 2) | 125 if (scm_ilength (args) > 2) |
126 scm_display_error_message (scm_cadr (args), scm_caddr (args), scm_current_er
ror_port ()); | 126 scm_display_error_message (scm_cadr (args), scm_caddr (args), scm_current_er
ror_port ()); |
127 | 127 |
128 return SCM_UNDEFINED; | 128 return SCM_UNDEFINED; |
129 } | 129 } |
130 | 130 |
131 SCM | 131 SCM |
132 protected_ly_parse_scm (Parse_start *ps) | 132 protected_ly_parse_scm (Parse_start *ps) |
133 { | 133 { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 return ans; | 168 return ans; |
169 } | 169 } |
170 | 170 |
171 SCM | 171 SCM |
172 ly_eval_scm (SCM form, Input i, bool safe, Lily_parser *parser) | 172 ly_eval_scm (SCM form, Input i, bool safe, Lily_parser *parser) |
173 { | 173 { |
174 Parse_start ps (form, i, safe, parser); | 174 Parse_start ps (form, i, safe, parser); |
175 | 175 |
176 SCM ans = scm_c_with_fluid | 176 SCM ans = scm_c_with_fluid |
177 (Lily::f_location, | 177 (Lily::f_location, |
178 i.smobbed_copy (), | 178 i.smobbed_copy (), |
179 parse_protect_global ? protected_ly_eval_scm | 179 parse_protect_global ? protected_ly_eval_scm |
180 : catch_protected_eval_body, (void *) &ps); | 180 : catch_protected_eval_body, (void *) &ps); |
181 | 181 |
182 scm_remember_upto_here_1 (form); | 182 scm_remember_upto_here_1 (form); |
183 return ans; | 183 return ans; |
184 } | 184 } |
OLD | NEW |