]> git.donarmstrong.com Git - lilypond.git/blob - lily/stencil-expression.cc
Run `make grand-replace'.
[lilypond.git] / lily / stencil-expression.cc
1 /*
2   stencil-expression.cc -- keep track of which expressions are valid
3   stencil exps.
4
5   source file of the GNU LilyPond music typesetter
6
7   (c) 2005--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
8 */
9
10 #include "stencil.hh"
11
12 static SCM heads;
13
14 void register_stencil_head (SCM symbol)
15 {
16   if (!heads)
17     heads = scm_permanent_object (scm_cons (SCM_EOL, SCM_EOL));
18   
19   scm_set_object_property_x (symbol, ly_symbol2scm ("stencil-head?"), SCM_BOOL_T);
20   scm_set_cdr_x (heads,  scm_cons (symbol, scm_cdr (heads)));
21 }
22
23 bool
24 is_stencil_head (SCM symbol)
25 {
26   return scm_object_property (symbol, ly_symbol2scm ("stencil-head?"))
27     == SCM_BOOL_T;
28 }
29
30 SCM
31 all_stencil_heads ()
32 {
33   return scm_cdr (heads);
34 }
35