- Lily_parser *parser = unsmob_my_lily_parser (parser_smob);
- Score *score = unsmob_score (score_smob);
-
- Object_key * key = new Lilypond_general_key (0, score->user_key_, 0);
-
- if (score->error_found_)
- return SCM_UNSPECIFIED;
-
- SCM_ASSERT_TYPE (parser, parser_smob, SCM_ARG1, __FUNCTION__, "parser");
- SCM_ASSERT_TYPE (score, score_smob, SCM_ARG2, __FUNCTION__, "score");
-
- SCM header = ly_c_module_p (score->header_) ? score->header_
- : parser->lexer_->lookup_identifier ("$globalheader");
-
- File_name outname (parser->output_basename_);
- int *c = &parser->book_count_;
- if (*c)
- outname.base_ += "-" + to_string (*c);
- (*c)++;
-
- SCM os = scm_makfrom0str (outname.to_string ().to_str0 ());
- SCM paper = get_paper (parser)->self_scm ();
- for (int i = 0; i < score->defs_.size (); i++)
- default_rendering (score->get_music (), score->defs_[i]->self_scm (),
- paper,
- header, os,
- key->self_scm ());
-
- if (score->defs_.is_empty ())
+ LY_ASSERT_SMOB (Lily_parser, parser_smob, 1);
+ Lily_parser *parser = unsmob<Lily_parser> (parser_smob);
+ LY_ASSERT_TYPE (scm_is_string, ly_code, 2);
+ string fn;
+ if (SCM_UNBNDP (filename) || !scm_is_string (filename))
+ fn = "<string>";
+ else
+ fn = ly_scm2string (filename);
+ int ln;
+ if (SCM_UNBNDP (line) || !scm_is_integer (line))
+ ln = 0;
+ else
+ ln = scm_to_int (line);
+
+ if (!parser->lexer_->is_clean ())