7f9469b274238a99c202ef390a5262442b31aee0
[bpt/guile.git] / 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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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_TYP16_PREDICATE (scm_tc16_macro, (x))
33 #define SCM_MACRO_TYPE(m) (SCM_CELL_WORD_0 (m) >> 16)
34 #define SCM_MACRO_CODE(m) SCM_CELL_OBJECT_1 (m)
35
36 SCM_API scm_t_bits scm_tc16_macro;
37
38 SCM_API SCM scm_makacro (SCM code);
39 SCM_API SCM scm_makmmacro (SCM code);
40 SCM_API SCM scm_macro_p (SCM obj);
41 SCM_API SCM scm_macro_type (SCM m);
42 SCM_API SCM scm_macro_name (SCM m);
43 SCM_API SCM scm_macro_transformer (SCM m);
44 SCM_API SCM scm_make_synt (const char *name,
45 SCM (*macroizer) (SCM),
46 SCM (*fcn) ());
47 SCM_API void scm_init_macros (void);
48
49 #if SCM_ENABLE_DEPRECATED == 1
50 SCM_API SCM scm_makmacro (SCM code);
51 #endif
52
53 #endif /* SCM_MACROS_H */
54
55 /*
56 Local Variables:
57 c-file-style: "gnu"
58 End:
59 */