use of org.jf.smali.InvalidToken in project smali by JesusFreke.
the class PsiBuilderTokenStream method buildCurrentToken.
private void buildCurrentToken() {
IElementType element = psiBuilder.getTokenType();
if (element != null) {
if (element instanceof SmaliLexicalElementType) {
SmaliLexicalElementType elementType = (SmaliLexicalElementType) element;
currentToken = new CommonToken(elementType.tokenId, psiBuilder.getTokenText());
} else if (element == TokenType.BAD_CHARACTER) {
currentToken = new InvalidToken("", psiBuilder.getTokenText());
} else {
throw new UnsupportedOperationException();
}
} else {
currentToken = new CommonToken(Token.EOF);
}
}
Aggregations