Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
-#include <cctype>
-#include <sstream>
+#include <msp/strings/formatter.h>
#include "binaryparser.h"
#include "parser.h"
#include "statement.h"
namespace Msp {
namespace DataFile {
-Parser::Parser(istream &i, const string &s):
+Parser::Parser(IO::Base &i, const string &s):
in(i),
+ main_src(s),
src(s),
good(true),
mode(new TextParser(in, src))
delete mode;
mode=new TextParser(in, src);
}
+ else if(st.keyword=="__src")
+ {
+ string s=st.args[0].get<string>();
+ if(s.empty())
+ src=main_src;
+ else
+ src=format("%s[%s]", main_src, s);
+ }
else
return st;
}