本文整理汇总了Java中com.intellij.lang.javascript.JSTokenTypes.EQEQ属性的典型用法代码示例。如果您正苦于以下问题:Java JSTokenTypes.EQEQ属性的具体用法?Java JSTokenTypes.EQEQ怎么用?Java JSTokenTypes.EQEQ使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.lang.javascript.JSTokenTypes
的用法示例。
在下文中一共展示了JSTokenTypes.EQEQ属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseIfStatement
protected void parseIfStatement(final PsiBuilder builder)
{
StatementParsing.LOGGER.assertTrue(builder.getTokenType() == JSTokenTypes.IF_KEYWORD);
final PsiBuilder.Marker ifStatement = builder.mark();
builder.advanceLexer();
Parsing.checkMatches(builder, JSTokenTypes.LPAR, JavaScriptBundle.message("javascript.parser.message.expected.lparen"));
getExpressionParsing().parseExpression(builder);
// handle empty expressions inside
while(builder.getTokenType() == JSTokenTypes.OROR || builder.getTokenType() == JSTokenTypes.EQEQ)
{
builder.advanceLexer();
}
Parsing.checkMatches(builder, JSTokenTypes.RPAR, JavaScriptBundle.message("javascript.parser.message.expected.rparen"));
parseStatement(builder);
if(builder.getTokenType() == JSTokenTypes.ELSE_KEYWORD)
{
builder.advanceLexer();
parseStatement(builder);
}
ifStatement.done(JSElementTypes.IF_STATEMENT);
}
示例2: buildFix
@Override
protected InspectionJSFix buildFix(PsiElement location) {
final JSBinaryExpression expression = (JSBinaryExpression) location;
final IElementType sign = expression.getOperationSign();
if (JSTokenTypes.EQEQ == sign) {
return new EqualityComparisonWithCoercionFix("===");
} else if (JSTokenTypes.NE == sign) {
return new EqualityComparisonWithCoercionFix("!==");
}
return null;
}