parser->lexer_->override_input (spot))
/* ES TODO:
-- Don't use lily module, create a new module instead.
- delay application of the function
*/
-static SCM
-syntax_call (void *arg)
-{
- SCM sarg = reinterpret_cast <SCM> (arg);
- return scm_apply_0 (scm_car (sarg), scm_cdr (sarg));
-}
-
-#define LOWLEVEL_MAKE_SYNTAX(location, args) \
- scm_c_with_fluid \
- (Lily::f_location, \
- parser->lexer_->override_input (location).smobbed_copy (), \
- syntax_call, \
- reinterpret_cast <void*> (args))
+#define LOWLEVEL_MAKE_SYNTAX(location, proc, ...) \
+ with_location \
+ (parser->lexer_->override_input (location).smobbed_copy (), \
+ proc, \
+ ##__VA_ARGS__)
/* Syntactic Sugar. */
#define MAKE_SYNTAX(name, location, ...) \
- LOWLEVEL_MAKE_SYNTAX (location, \
- scm_list_n (Syntax::name, \
- ##__VA_ARGS__, SCM_UNDEFINED))
+ LOWLEVEL_MAKE_SYNTAX (location, Syntax::name, ##__VA_ARGS__)
#define START_MAKE_SYNTAX(name, ...) \
- scm_list_n (Syntax::name, \
- ##__VA_ARGS__, SCM_UNDEFINED)
+ scm_list_n (Syntax::name, ##__VA_ARGS__, SCM_UNDEFINED)
#define FINISH_MAKE_SYNTAX(start, location, ...) \
- LOWLEVEL_MAKE_SYNTAX (location, \
- scm_append_x \
- (scm_list_2 (start, scm_list_n \
- (__VA_ARGS__, SCM_UNDEFINED))))
+ LOWLEVEL_MAKE_SYNTAX \
+ (location, \
+ Guile_user::apply, \
+ scm_car (start), \
+ scm_append_x \
+ (scm_list_2 (scm_cdr (start), \
+ scm_list_n (__VA_ARGS__, SCM_UNDEFINED))))
SCM get_next_unique_context_id ();
SCM get_next_unique_lyrics_context_id ();