本文整理汇总了Java中com.intellij.lang.javascript.JSTokenTypes.OR属性的典型用法代码示例。如果您正苦于以下问题:Java JSTokenTypes.OR属性的具体用法?Java JSTokenTypes.OR怎么用?Java JSTokenTypes.OR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.lang.javascript.JSTokenTypes
的用法示例。
在下文中一共展示了JSTokenTypes.OR属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseUnaryExpression
@Override
protected boolean parseUnaryExpression() {
final IElementType tokenType = builder.getTokenType();
if (tokenType == JSTokenTypes.OR) {
builder.advanceLexer();
return true;
}
if (tokenType == EmberJSTokenTypes.ONE_TIME_BINDING) {
final PsiBuilder.Marker expr = builder.mark();
builder.advanceLexer();
if (!super.parseUnaryExpression()) {
builder.error(JSBundle.message("javascript.parser.message.expected.expression"));
}
expr.done(JSElementTypes.PREFIX_EXPRESSION);
return true;
}
return super.parseUnaryExpression();
}
示例2: parseBitwiseORExpression
private boolean parseBitwiseORExpression(final PsiBuilder builder, final boolean allowIn)
{
PsiBuilder.Marker expr = builder.mark();
if(!parseBitwiseXORExpression(builder, allowIn))
{
expr.drop();
return false;
}
while(builder.getTokenType() == JSTokenTypes.OR)
{
builder.advanceLexer();
if(!parseBitwiseXORExpression(builder, allowIn))
{
builder.error(JavaScriptBundle.message("javascript.parser.message.expected.expression"));
}
expr.done(JSElementTypes.BINARY_EXPRESSION);
expr = expr.precede();
}
expr.drop();
return true;
}
示例3: getCurrentBinarySignPriority
@Override
protected int getCurrentBinarySignPriority(boolean allowIn, boolean advance) {
if (builder.getTokenType() == JSTokenTypes.OR) return 10;
return super.getCurrentBinarySignPriority(allowIn, advance);
}
示例4: getSpaceAroundOption
private boolean getSpaceAroundOption(final IElementType opSign)
{
boolean option = false;
if(JSTokenTypes.ADDITIVE_OPERATIONS.contains(opSign))
{
option = mySettings.SPACE_AROUND_ADDITIVE_OPERATORS;
}
else if(JSTokenTypes.MULTIPLICATIVE_OPERATIONS.contains(opSign))
{
option = mySettings.SPACE_AROUND_MULTIPLICATIVE_OPERATORS;
}
else if(JSTokenTypes.ASSIGNMENT_OPERATIONS.contains(opSign))
{
option = mySettings.SPACE_AROUND_ASSIGNMENT_OPERATORS;
}
else if(JSTokenTypes.EQUALITY_OPERATIONS.contains(opSign))
{
option = mySettings.SPACE_AROUND_EQUALITY_OPERATORS;
}
else if(JSTokenTypes.RELATIONAL_OPERATIONS.contains(opSign))
{
option = mySettings.SPACE_AROUND_RELATIONAL_OPERATORS;
}
else if(JSTokenTypes.SHIFT_OPERATIONS.contains(opSign))
{
option = mySettings.SPACE_AROUND_BITWISE_OPERATORS;
}
else if(opSign == JSTokenTypes.ANDAND || opSign == JSTokenTypes.OROR)
{
option = mySettings.SPACE_AROUND_LOGICAL_OPERATORS;
}
else if(opSign == JSTokenTypes.OR || opSign == JSTokenTypes.AND || opSign == JSTokenTypes.XOR)
{
option = mySettings.SPACE_AROUND_BITWISE_OPERATORS;
}
else if(opSign == JSTokenTypes.IS_KEYWORD || opSign == JSTokenTypes.AS_KEYWORD)
{
option = true;
}
return option;
}