]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-lexer.cc
Issue 4439/1: Use Input::non_fatal_error instead of Input::error where appropriate
[lilypond.git] / lily / lily-lexer.cc
index 4ddd8643252585b2c5e032e20f1e1455a73a3c44..d9d284864f3676489cd6c6841e52ddd66f1bac22 100644 (file)
@@ -123,8 +123,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<Input> (override_input))
+    override_input_ = *unsmob<Input> (override_input);
 
   smobify_self ();
 
@@ -193,7 +193,7 @@ Lily_lexer::keyword_list () const
   SCM *tail = &l;
   for (vsize i = 0; i < keytable_->table_.size (); i++)
     {
-      *tail = scm_acons (scm_from_locale_string (keytable_->table_[i].name_),
+      *tail = scm_acons (scm_from_utf8_string (keytable_->table_[i].name_),
                          scm_from_int (keytable_->table_[i].tokcode_),
                          SCM_EOL);
 
@@ -209,7 +209,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,7 +281,7 @@ 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);
         }
       scm_module_define (mod, sym, val);
@@ -299,7 +299,7 @@ Lily_lexer::LexerError (char const *s)
     {
       error_level_ |= 1;
       Input spot (*lexloc_);
-      spot.error (s);
+      spot.non_fatal_error (s);
     }
 }