Binary format is loaded directly, without statement structures.
const string &Loader::get_source() const
{
- if(!cur_st)
+ if(cur_st)
+ return cur_st->source;
+ else if(cur_parser)
+ return cur_parser->get_source();
+ else
throw logic_error("no current statement");
- return cur_st->source;
}
const string &Loader::get_keyword() const
statement's signature. */
bool parse_and_load(unsigned, Loader &, const LoaderAction &);
+ const std::string &get_source() const { return src; }
+
explicit operator bool() const { return good && in; }
};