boolean inAnchorTag = false;
boolean inHrefAttribute = false;
int tokenEndColumn = 0;
for (int i = 0, l = tokens.size() - 1; i < l; i++) {
Token token = tokens.get(i);
TokenType type = token.getType();
String value = token.getValue();
int tokenStartColumn = tokenEndColumn;
tokenEndColumn += value.length(); // Exclusive.
if (type == TokenType.TAG) {
if (">".equals(value) || "/>".equals(value)) {