add_scope (ly_make_anonymous_module (false));
push_note_state (scm_c_make_hash_table (0));
- chordmodifier_tab_ = scm_make_vector (scm_int2num (1), SCM_EOL);
+ chordmodifier_tab_ = scm_make_vector (scm_from_int (1), SCM_EOL);
}
Lily_lexer::Lily_lexer (Lily_lexer const &src)
pitchname_tab_stack_ = src.pitchname_tab_stack_;
sources_ = src.sources_;
start_module_ = SCM_EOL;
-
+
error_level_ = src.error_level_;
is_main_input_ = src.is_main_input_;
ly_reexport_module (scm_current_module ());
if (!scm_is_pair (scopes_))
start_module_ = scm_current_module ();
-
+
for (SCM s = scopes_; scm_is_pair (s); s = scm_cdr (s))
- {
- ly_use_module (module, scm_car (s));
- }
+ ly_use_module (module, scm_car (s));
scopes_ = scm_cons (module, scopes_);
set_current_scope ();
}
-
SCM
Lily_lexer::remove_scope ()
{
Lily_lexer::set_current_scope ()
{
SCM old = scm_current_module ();
-
+
if (scm_is_pair (scopes_))
scm_set_current_module (scm_car (scopes_));
else
SCM mod = scm_car (scopes_);
scm_module_define (mod, sym, s);
-#if 0
- SCM setter = ly_lily_module_constant ("module-define!");
- scm_call_3 (setter, mod, sym, s);
-#endif
}
else
programming_error ("identifier is not a symbol");
Input
Lily_lexer::here_input () const
{
- return Input(*lexloc);
+ return Input (*lexloc);
}
void
void
Lily_lexer::add_lexed_char (int count)
{
- char const * start = here_str0 ();
+ char const *start = here_str0 ();
lexloc->set (get_source_file (),
start, start + count);
char_count_stack_.top () += count;