]> git.donarmstrong.com Git - lilypond.git/blob - guile18/libguile/macros.h
Import guile-1.8 as multiple upstream tarball component
[lilypond.git] / guile18 / libguile / macros.h
1 /* classes: h_files */
2
3 #ifndef SCM_MACROS_H
4 #define SCM_MACROS_H
5
6 /* Copyright (C) 1998,2000,2001,2002,2003, 2006 Free Software Foundation, Inc.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22
23 \f
24
25 #include "libguile/__scm.h"
26
27 \f
28
29 #define SCM_ASSYNT(_cond, _msg, _subr) \
30   if (!(_cond)) scm_misc_error (_subr, _msg, SCM_EOL);
31
32 #define SCM_MACROP(x) SCM_SMOB_PREDICATE (scm_tc16_macro, (x))
33 #define SCM_MACRO_TYPE(m) SCM_SMOB_FLAGS (m)
34 #define SCM_BUILTIN_MACRO_P(x) (SCM_MACROP (x) && SCM_MACRO_TYPE (x) == 3)
35 #define SCM_MACRO_CODE(m) SCM_SMOB_OBJECT (m)
36
37 SCM_API scm_t_bits scm_tc16_macro;
38
39 SCM_API SCM scm_i_makbimacro (SCM code);
40 SCM_API SCM scm_makmmacro (SCM code);
41 SCM_API SCM scm_makacro (SCM code);
42 SCM_API SCM scm_macro_p (SCM obj);
43 SCM_API SCM scm_macro_type (SCM m);
44 SCM_API SCM scm_macro_name (SCM m);
45 SCM_API SCM scm_macro_transformer (SCM m);
46 SCM_API SCM scm_make_synt (const char *name,
47                            SCM (*macroizer) (SCM),
48                            SCM (*fcn) ());
49 SCM_API void scm_init_macros (void);
50
51 #if SCM_ENABLE_DEPRECATED == 1
52 SCM_API SCM scm_makmacro (SCM code);
53 #endif
54
55 #endif  /* SCM_MACROS_H */
56
57 /*
58   Local Variables:
59   c-file-style: "gnu"
60   End:
61 */