use of dyvilx.tools.parsing.token.InferredSemicolon in project Dyvil by Dyvil.
the class SemicolonInference method inferSemicolons.
public static void inferSemicolons(IToken first) {
if (first == null) {
return;
}
IToken prev = first;
IToken next = first.next();
while (next.type() != Tokens.EOF) {
next.setPrev(prev);
if (inferSemicolon(prev, next)) {
final IToken semicolon = new InferredSemicolon(prev.endLine(), prev.endColumn());
semicolon.setNext(next);
semicolon.setPrev(prev);
next.setPrev(semicolon);
prev.setNext(semicolon);
}
prev = next;
next = next.next();
}
}
Aggregations