Added projects and basic build scripts. Project for scripting engine, API, Main 1.7 version and one for each mod supported in 1.7.

This commit is contained in:
Stan Hebben committed 2014-06-09 20:33:30 +02:00
1 parent 219106f392
commit 38b78ce305
281 files changed
+25090 -49

No files matched your search

@@ -0,0 +1,40 @@
/*
* This file is subject to the license.txt file in the main folder
* of this project.
*/
package stanhebben.zenscript.parser;
import stanhebben.zenscript.ZenParsedFile;
/**
*
* @author Stan
*/
public class ParseException extends RuntimeException {
private final Token token;
private final String message;
public ParseException(Token token, String error) {
super(token == null ? "Error at end of file - " + error : "Error parsing line " + token.getPosition().getLine() + ":" + token.getPosition().getLineOffset() + " - " + error + " (last token: " + token.getValue() + ")");
this.token = token;
this.message = error;
}
public ZenParsedFile getFile() {
return token == null ? null : token.getPosition().getFile();
}
public int getLine() {
return token == null ? -1 : token.getPosition().getLine();
}
public int getLineOffset() {
return token == null ? -1 : token.getPosition().getLineOffset();
}
public String getExplanation() {
return message;
}
}