X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flily-lexer.cc;h=424259beea59b17d6e5e6d7e1d96664548cdf14d;hb=4b5f26f98d4737ebb1219c4b1ba0902f25c3017d;hp=d3673f2cdfbbea141d3edf80b56727be4285953f;hpb=daf323ec5bc8a09f80ea54c63f1cfedb310d2aaa;p=lilypond.git diff --git a/lily/lily-lexer.cc b/lily/lily-lexer.cc index d3673f2cdf..424259beea 100644 --- a/lily/lily-lexer.cc +++ b/lily/lily-lexer.cc @@ -109,7 +109,7 @@ Lily_lexer::Lily_lexer (Sources *sources, Lily_parser *parser) chord_repetition_ = Chord_repetition (); smobify_self (); - add_scope (ly_make_anonymous_module (false)); + add_scope (ly_make_module (false)); push_note_state (scm_c_make_hash_table (0)); chordmodifier_tab_ = scm_make_vector (scm_from_int (1), SCM_EOL); } @@ -136,7 +136,7 @@ Lily_lexer::Lily_lexer (Lily_lexer const &src, Lily_parser *parser) SCM *tail = &scopes; for (SCM s = src.scopes_; scm_is_pair (s); s = scm_cdr (s)) { - SCM newmod = ly_make_anonymous_module (false); + SCM newmod = ly_make_module (false); ly_module_copy (newmod, scm_car (s)); *tail = scm_cons (newmod, SCM_EOL); tail = SCM_CDRLOC (*tail); @@ -295,9 +295,9 @@ Lily_lexer::set_identifier (SCM path, SCM val) if (scm_is_pair (path)) { - SCM prev = scm_module_lookup (mod, sym); - if (prev != SCM_UNDEFINED) - val = nested_property_alist (prev, path, val); + SCM prev = ly_module_lookup (mod, sym); + if (prev != SCM_BOOL_F) + val = nested_property_alist (scm_variable_ref (prev), path, val); } scm_module_define (mod, sym, val); } @@ -391,3 +391,9 @@ Lily_lexer::print_smob (SCM s, SCM port, scm_print_state*) scm_puts (" >", port); return 1; } + +bool +Lily_lexer::is_clean () const +{ + return include_stack_.empty (); +}