X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flily-lexer.cc;h=6db0e653e5480d224427df3488bd12ae5c1a3bb5;hb=5d84bfad4626892bcffd05adcced53c8a2329047;hp=6c118979ae39e4dca10bbd01e9926985129ffd07;hpb=55ff9f5a64a00b6c369be47eb8ca3949250f120b;p=lilypond.git diff --git a/lily/lily-lexer.cc b/lily/lily-lexer.cc index 6c118979ae..6db0e653e5 100644 --- a/lily/lily-lexer.cc +++ b/lily/lily-lexer.cc @@ -35,6 +35,7 @@ using namespace std; #include "warn.hh" #include "program-option.hh" #include "lily-parser.hh" +#include "ly-module.hh" static Keyword_ent the_key_tab[] = @@ -56,6 +57,7 @@ static Keyword_ent the_key_tab[] {"description", DESCRIPTION}, {"drummode", DRUMMODE}, {"drums", DRUMS}, + {"etc", ETC}, {"figuremode", FIGUREMODE}, {"figures", FIGURES}, {"header", HEADER}, @@ -123,8 +125,8 @@ Lily_lexer::Lily_lexer (Lily_lexer const &src, Lily_parser *parser, main_input_level_ = 0; extra_tokens_ = SCM_EOL; - if (Input::is_smob (override_input)) - override_input_ = *Input::unsmob (override_input); + if (unsmob (override_input)) + override_input_ = *unsmob (override_input); smobify_self (); @@ -209,7 +211,7 @@ Lily_lexer::lookup_identifier_symbol (SCM sym) for (SCM s = scopes_; scm_is_pair (s); s = scm_cdr (s)) { SCM var = ly_module_lookup (scm_car (s), sym); - if (var != SCM_BOOL_F) + if (scm_is_true (var)) return scm_variable_ref (var); } @@ -281,8 +283,10 @@ Lily_lexer::set_identifier (SCM path, SCM val) if (scm_is_pair (path)) { SCM prev = ly_module_lookup (mod, sym); - if (prev != SCM_BOOL_F) + if (scm_is_true (prev)) val = nested_property_alist (scm_variable_ref (prev), path, val); + else + val = nested_create_alist (path, val); } scm_module_define (mod, sym, val); } @@ -299,7 +303,7 @@ Lily_lexer::LexerError (char const *s) { error_level_ |= 1; Input spot (*lexloc_); - spot.error (s); + spot.non_fatal_error (s); } } @@ -365,10 +369,10 @@ Lily_lexer::add_lexed_char (int count) } -const char Lily_lexer::type_p_name_[] = "ly:lily-lexer?"; +const char * const Lily_lexer::type_p_name_ = "ly:lily-lexer?"; SCM -Lily_lexer::mark_smob () +Lily_lexer::mark_smob () const { ASSERT_LIVE_IS_ALLOWED (self_scm ()); @@ -382,7 +386,7 @@ Lily_lexer::mark_smob () } int -Lily_lexer::print_smob (SCM port, scm_print_state *) +Lily_lexer::print_smob (SCM port, scm_print_state *) const { scm_puts ("#