mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Fixed bug in script parser/compiler: "x[if a then b else c]" was incorrectly optimized;
Sciript parse errors in include files now get reported for the right file and line number. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@458 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+4
-4
@@ -24,12 +24,12 @@ String Error::what() const {
|
||||
|
||||
// ----------------------------------------------------------------------------- : Parse errors
|
||||
|
||||
ScriptParseError::ScriptParseError(size_t pos, const String& error)
|
||||
: start(pos), end(pos)
|
||||
ScriptParseError::ScriptParseError(size_t pos, int line, const String& filename, const String& error)
|
||||
: start(pos), end(pos), line(line), filename(filename)
|
||||
, ParseError(error)
|
||||
{}
|
||||
ScriptParseError::ScriptParseError(size_t pos, const String& exp, const String& found)
|
||||
: start(pos), end(pos + found.size())
|
||||
ScriptParseError::ScriptParseError(size_t pos, int line, const String& filename, const String& exp, const String& found)
|
||||
: start(pos), end(pos + found.size()), line(line), filename(filename)
|
||||
, ParseError(_("Expected '") + exp + _("' instead of '") + found + _("'"))
|
||||
{}
|
||||
String ScriptParseError::what() const {
|
||||
|
||||
Reference in New Issue
Block a user