本文整理汇总了Java中com.intellij.lang.javascript.JSTokenTypes.WHILE_KEYWORD属性的典型用法代码示例。如果您正苦于以下问题:Java JSTokenTypes.WHILE_KEYWORD属性的具体用法?Java JSTokenTypes.WHILE_KEYWORD怎么用?Java JSTokenTypes.WHILE_KEYWORD使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.lang.javascript.JSTokenTypes
的用法示例。
在下文中一共展示了JSTokenTypes.WHILE_KEYWORD属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseIterationStatement
protected void parseIterationStatement(final PsiBuilder builder)
{
final IElementType tokenType = builder.getTokenType();
if(tokenType == JSTokenTypes.DO_KEYWORD)
{
parseDoWhileStatement(builder);
}
else if(tokenType == JSTokenTypes.WHILE_KEYWORD)
{
parseWhileStatement(builder);
}
else if(tokenType == JSTokenTypes.FOR_KEYWORD)
{
parseForStatement(builder);
}
else
{
StatementParsing.LOGGER.error("Unknown iteration statement");
}
}
示例2: visitDoWhileStatement
@Override
public void visitDoWhileStatement(final ASTNode node)
{
if(type2 == JSTokenTypes.WHILE_KEYWORD)
{
if(mySettings.WHILE_ON_NEW_LINE)
{
myResult = Spacing.createSpacing(0, 0, 1, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_CODE);
}
else
{
myResult = Spacing.createSpacing(1, 1, 0, mySettings.KEEP_LINE_BREAKS, mySettings.KEEP_BLANK_LINES_IN_CODE);
}
}
else if(type2 == JSTokenTypes.LPAR)
{
setSingleSpace(mySettings.SPACE_BEFORE_WHILE_PARENTHESES);
}
else if(type1 == JSTokenTypes.LPAR || type2 == JSTokenTypes.RPAR)
{
setSingleSpace(mySettings.SPACE_WITHIN_WHILE_PARENTHESES);
}
}
示例3: visitWhileStatement
@Override
public void visitWhileStatement(final ASTNode node)
{
if(type1 == JSTokenTypes.WHILE_KEYWORD && type2 == JSTokenTypes.LPAR)
{
setSingleSpace(mySettings.SPACE_BEFORE_WHILE_PARENTHESES);
}
else if(type1 == JSTokenTypes.RPAR && type2 == JSElementTypes.BLOCK_STATEMENT)
{
TextRange dependentRange = new TextRange(myParent.getStartOffset(), myChild1.getTextRange().getEndOffset());
setBraceSpace(mySettings.SPACE_BEFORE_WHILE_LBRACE, mySettings.BRACE_STYLE, dependentRange);
}
else if(type1 == JSTokenTypes.LPAR || type2 == JSTokenTypes.RPAR)
{
setSingleSpace(mySettings.SPACE_WITHIN_WHILE_PARENTHESES);
}
}