prompto.problem.UnwantedTokenProblem Maven / Gradle / Ivy
The newest version!
package prompto.problem;
import prompto.parser.UnwantedTokenException;
public class UnwantedTokenProblem extends ParserProblemBase {
UnwantedTokenException e;
public UnwantedTokenProblem(String path, int line, int column, UnwantedTokenException e) {
super(path, line, column);
this.e = e;
}
@Override
public int getStartIndex() {
return e.getStartIndex();
}
@Override
public int getEndIndex() {
return getStartIndex() + getOffendingText().length();
}
String getOffendingText() {
return e.getOffendingText();
}
@Override
public String getMessage() {
return "Unwanted token: " + getOffendingText();
}
@Override
public Type getType() {
return Type.ERROR;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy