mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
Closure operator now behaves as default argument operator, documentation.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@965 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -33,6 +33,10 @@ ScriptParseError::ScriptParseError(size_t pos, int line, const String& filename,
|
||||
: ParseError(_("Expected '") + exp + _("' instead of '") + found + _("'"))
|
||||
, start(pos), end(pos + found.size()), line(line), filename(filename)
|
||||
{}
|
||||
ScriptParseError::ScriptParseError(size_t pos1, size_t pos2, int line, const String& filename, const String& open, const String& close, const String& found)
|
||||
: ParseError(_("Expected closing '") + close + _("' for this '") + open + _("' instead of '") + found + _("'"))
|
||||
, start(pos1), end(pos2 + found.size()), line(line), filename(filename)
|
||||
{}
|
||||
String ScriptParseError::what() const {
|
||||
return String(_("(")) << (int)start << _("): ") << Error::what();
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ class ScriptParseError : public ParseError {
|
||||
public:
|
||||
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);
|
||||
ScriptParseError(size_t pos1, size_t pos2, int line, const String& filename, const String& open, const String& close, const String& found);
|
||||
/// Position of the error
|
||||
size_t start, end;
|
||||
/// Line number of the error (the first line is 1)
|
||||
|
||||
Reference in New Issue
Block a user