TokenSequence<LatteTopTokenId> sequence = LexUtils.getTopSequence(getSnapshot().getText().toString());
sequence.moveStart();
LatteResolver latteResolver = new LatteResolver(this);
HtmlPhpResolver htmlPhpResolver = new HtmlPhpResolver(this);
while(sequence.moveNext()) {
Token t = sequence.token();
if(t.id() == LatteTopTokenId.LATTE) {
latteResolver.solve(t, sequence); // deals with all latte macros
SyntaxUtils.findArrayForHint(getSnapshot().getSource().getDocument(true), sequence);
} else {
htmlPhpResolver.solve(t, sequence);
}
}
return super.getEmbeddings();
}