implemented html export (only for writing the main file, not the write_file functions);

fixed parser bug: (...\n...) was not parsed as a statement separator if the second ... starts with a string or number


git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@432 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-06-25 16:31:09 +00:00
parent 4bf2d44ebe
commit 5c6cb41458
13 changed files with 119 additions and 46 deletions
+2 -2
View File
@@ -172,7 +172,7 @@ class ScriptString : public ScriptValue {
public:
ScriptString(const String& v) : value(v) {}
virtual ScriptType type() const { return SCRIPT_STRING; }
virtual String typeName() const { return _TYPE_("string"); }
virtual String typeName() const { return _TYPE_("string") + _(" (\"") + (value.size() < 30 ? value : value.substr(0,30) + _("...")) + _("\")"); }
virtual operator String() const { return value; }
virtual operator double() const {
double d;
@@ -209,7 +209,7 @@ class ScriptString : public ScriptValue {
if (name.ToLong(&index) && index >= 0 && (size_t)index < value.size()) {
return to_script(String(1,value[index]));
} else {
throw ScriptError(_ERROR_2_("has no member value", value, name));
return delayError(_ERROR_2_("has no member value", value, name));
}
}
private: