本文整理汇总了Java中com.intellij.lang.javascript.JSTokenTypes.DOT属性的典型用法代码示例。如果您正苦于以下问题:Java JSTokenTypes.DOT属性的具体用法?Java JSTokenTypes.DOT怎么用?Java JSTokenTypes.DOT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.lang.javascript.JSTokenTypes
的用法示例。
在下文中一共展示了JSTokenTypes.DOT属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseMainJsFile
public void parseMainJsFile(TreeElement node) {
TreeElement firstChild = node.getFirstChildNode();
if (firstChild != null) {
parseMainJsFile(firstChild);
}
TreeElement nextNode = node.getTreeNext();
if (nextNode != null) {
parseMainJsFile(nextNode);
}
if (node.getElementType() == JSTokenTypes.IDENTIFIER) {
if (node.getText().equals("requirejs") || node.getText().equals("require")) {
TreeElement treeParent = node.getTreeParent();
if (null != treeParent) {
ASTNode firstTreeChild = treeParent.findChildByType(JSElementTypes.OBJECT_LITERAL_EXPRESSION);
TreeElement nextTreeElement = treeParent.getTreeNext();
if (null != firstTreeChild) {
parseRequirejsConfig((TreeElement) firstTreeChild
.getFirstChildNode()
);
} else if (null != nextTreeElement && nextTreeElement.getElementType() == JSTokenTypes.DOT) {
nextTreeElement = nextTreeElement.getTreeNext();
if (null != nextTreeElement && nextTreeElement.getText().equals("config")) {
treeParent = nextTreeElement.getTreeParent();
findAndParseConfig(treeParent);
}
} else {
findAndParseConfig(treeParent);
}
}
}
}
}
示例2: visitEmbeddedContent
@Override
public void visitEmbeddedContent(final ASTNode node)
{
if(type2 == JSTokenTypes.END_OF_LINE_COMMENT)
{
myResult = Spacing.createSpacing(0, Integer.MAX_VALUE, 0, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_CODE);
}
else if(JSElementTypes.SOURCE_ELEMENTS.contains(type1) ||
JSElementTypes.SOURCE_ELEMENTS.contains(type2) && type1 != JSTokenTypes.DOT ||
type2 == JSTokenTypes.RBRACE)
{
myResult = Spacing.createSpacing(0, 0, 1, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_CODE);
}
}
示例3: parseQualifiedTypeName
public boolean parseQualifiedTypeName(PsiBuilder builder, boolean allowStar)
{
if(!JSTokenTypes.IDENTIFIER_TOKENS_SET.contains(builder.getTokenType()))
{
return false;
}
PsiBuilder.Marker expr = builder.mark();
Parsing.buildTokenElement(JSElementTypes.REFERENCE_EXPRESSION, builder);
while(builder.getTokenType() == JSTokenTypes.DOT)
{
boolean stop = false;
builder.advanceLexer();
final IElementType tokenType = builder.getTokenType();
if(tokenType == JSTokenTypes.ANY_IDENTIFIER && allowStar)
{
builder.advanceLexer();
stop = true;
}
else if(tokenType == JSTokenTypes.DEFAULT_KEYWORD || (tokenType != JSTokenTypes.IDENTIFIER && JSTokenTypes.IDENTIFIER_TOKENS_SET
.contains(tokenType)))
{
builder.advanceLexer(); // TODO: allow any keyword
}
else
{
Parsing.checkMatches(builder, JSTokenTypes.IDENTIFIER, JavaScriptBundle.message("javascript.parser.message.expected.name"));
}
expr.done(JSElementTypes.REFERENCE_EXPRESSION);
expr = expr.precede();
if(stop)
{
break;
}
}
expr.drop();
return true;
}
示例4: parseQualifiedTypeName
@Override
public boolean parseQualifiedTypeName(PsiBuilder builder, boolean allowStar)
{
if(!JSTokenTypes.IDENTIFIER_TOKENS_SET.contains(builder.getTokenType()))
{
return false;
}
PsiBuilder.Marker expr = builder.mark();
buildTokenElement(JSElementTypes.REFERENCE_EXPRESSION, builder);
boolean hasGenerics = false;
while(builder.getTokenType() == JSTokenTypes.DOT)
{
boolean stop = false;
builder.advanceLexer();
final IElementType tokenType = builder.getTokenType();
if(tokenType == JSTokenTypes.ANY_IDENTIFIER && allowStar)
{
builder.advanceLexer();
stop = true;
}
else if(tokenType == JSTokenTypes.LT)
{
parseGenericSignature(builder);
stop = true;
hasGenerics = true;
}
else if(tokenType == JSTokenTypes.DEFAULT_KEYWORD || (tokenType != JSTokenTypes.IDENTIFIER && JSTokenTypes.IDENTIFIER_TOKENS_SET
.contains(tokenType)))
{
builder.advanceLexer(); // TODO: allow any keyword
}
else
{
checkMatches(builder, JSTokenTypes.IDENTIFIER, JavaScriptBundle.message("javascript.parser.message.expected.name"));
}
expr.done(JSElementTypes.REFERENCE_EXPRESSION);
expr = expr.precede();
if(stop)
{
break;
}
}
if(!hasGenerics && builder.getTokenType() == JSTokenTypes.LT)
{
parseGenericSignature(builder);
expr.done(JSElementTypes.REFERENCE_EXPRESSION);
}
else
{
expr.drop();
}
return true;
}