yy_switch_to_buffer (yy_create_buffer (file->get_istream (), YY_BUF_SIZE));
}
-void
-Includable_lexer::add_string_include (string data)
-{
- pending_string_includes_.push_back (data);
-}
-
/** pop the inputstack. conceptually this is a destructor, but it
does not destruct the Source_file that Includable_lexer::new_input
creates. */
bool close_input ();
vector<Source_file *> include_stack_;
vector<int> char_count_stack_;
- vector<string> pending_string_includes_;
public:
virtual void new_input (string s, Sources *);
void new_input (string name, string data, Sources *);
- void add_string_include (string data);
char const *here_str0 () const;
};
hi.step_forward ();
SCM sval = ly_parse_scm (hi.start (), &n, hi,
be_safe_global && is_main_input_, parser_);
- sval = eval_scm (sval);
for (int i = 0; i < n; i++)
{
}
char_count_stack_.back () += n;
- for (size_t i = 0; i < pending_string_includes_.size (); i++)
- new_input ("<included string>", pending_string_includes_[i],
- parser_->sources_);
- pending_string_includes_.clear ();
+ sval = eval_scm (sval);
int token = scan_scm_id (sval);
if (!scm_is_eq (yylval.scm, SCM_UNSPECIFIED))
void
Lily_parser::include_string (string ly_code)
{
- lexer_->add_string_include (ly_code);
+ lexer_->new_input ("<included string>", ly_code, sources_);
}
void