mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
improved handling of aliasses and warnings
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@51 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -32,12 +32,20 @@ ScriptValueP OptionalScript::invoke(Context& ctx) const {
|
||||
}
|
||||
}
|
||||
|
||||
void OptionalScript::parse(Reader& reader) {
|
||||
try {
|
||||
script = ::parse(unparsed);
|
||||
} catch (const ParseError& e) {
|
||||
reader.warning(e.what());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// custom reflection, different for each type
|
||||
|
||||
template <> void Reader::handle(OptionalScript& os) {
|
||||
handle(os.unparsed);
|
||||
// read the script
|
||||
os.script = parse(os.unparsed);
|
||||
os.parse(*this);
|
||||
}
|
||||
|
||||
template <> void Writer::handle(const OptionalScript& os) {
|
||||
|
||||
Reference in New Issue
Block a user