boolean isContext(Token token, int offset, boolean allowInStrings, boolean allowInActions) {
if (token == null) {
return false;
}
switch (token.getType()) {
case GrammarLexer.LEXER_CHAR_SET:
case GrammarLexer.ACTION_COMMENT:
return false;
case GrammarLexer.STRING_LITERAL:
case GrammarLexer.DOUBLE_QUOTE_STRING_LITERAL:
return allowInStrings;
case GrammarLexer.ARG_ACTION_WORD:
case GrammarLexer.ACTION_WORD:
return allowInActions;
case GrammarLexer.WS:
return true;
default:
return token.getChannel() == Lexer.DEFAULT_TOKEN_CHANNEL;
}
}
GrammarCompletionProvider.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:antlrworks2
作者:
评论列表
文章目录