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:
+6
-2
@@ -75,10 +75,14 @@ class FileParseError : public ParseError {
|
||||
/// Parse error in a script
|
||||
class ScriptParseError : public ParseError {
|
||||
public:
|
||||
ScriptParseError(size_t pos, const String& str);
|
||||
ScriptParseError(size_t pos, const String& expected, const String& found);
|
||||
ScriptParseError(size_t pos, int line, const String& filename, const String& str);
|
||||
ScriptParseError(size_t pos, int line, const String& filename, const String& expected, const String& found);
|
||||
/// Position of the error
|
||||
size_t start, end;
|
||||
/// Line number of the error (the first line is 1)
|
||||
int line;
|
||||
/// Filename the error was in, or an empty string
|
||||
String filename;
|
||||
/// Return the error message
|
||||
virtual String what() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user