All Downloads are FREE. Search and download functionalities are using the official Maven repository.

prompto.problem.MissingTokenProblem Maven / Gradle / Ivy

The newest version!
package prompto.problem;

import prompto.parser.MissingTokenException;

public class MissingTokenProblem extends ParserProblemBase {

	MissingTokenException e;
	
	public MissingTokenProblem(String path, int line, int column, MissingTokenException e) {
		super(path, line, column);
		this.e = e;
	}
	
	@Override
	public int getStartIndex() {
		return e.getStartIndex();
	}
	
	@Override
	public int getEndIndex() {
		return getStartIndex();
	}
	
	@Override
	public String getMessage() {
		return "Missing token, expecting: " + e.getMissingTokensAsString() 
				+ ", found: " + e.getOffendingText() + " instead.";
	}
	
	@Override
	public Type getType() {
		return Type.ERROR;
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy