return new TokeniserWithLocation(sourceText).tokenise();</BUG>
}
@Nonnull private Location getLocation() {
return new Location(1, this.index + 1, this.index);
<BUG>}
@Override @Nonnull protected TokeniserException createError(@Nonnull String message) {
TokeniserException e = super.createError(message);
e.location = this.getLocation();
return e;</BUG>
}

import java.util.regex.Pattern;
public class TokeniserWithLocation extends Tokeniser {
private TokeniserWithLocation(@Nonnull String sourceText) {
super(sourceText);
}
@Nonnull public static Token[] tokenise(@Nonnull String sourceText) {
return new TokeniserWithLocation(sourceText).tokenise();
}
@Nonnull private Location getLocation() {
return new Location(1, this.index + 1, this.index);
}
