本文整理汇总了Java中com.intellij.lang.javascript.JSTokenTypes.EQ属性的典型用法代码示例。如果您正苦于以下问题:Java JSTokenTypes.EQ属性的具体用法?Java JSTokenTypes.EQ怎么用?Java JSTokenTypes.EQ使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.lang.javascript.JSTokenTypes
的用法示例。
在下文中一共展示了JSTokenTypes.EQ属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseNamespaceNoMarker
private boolean parseNamespaceNoMarker(final PsiBuilder builder, final @NotNull PsiBuilder.Marker useNSStatement)
{
EcmaScript4StatementParsing.LOGGER.assertTrue(builder.getTokenType() == JSTokenTypes.NAMESPACE_KEYWORD);
builder.advanceLexer();
if(builder.getTokenType() == JSTokenTypes.LPAR)
{
useNSStatement.rollbackTo();
return false;
}
if(!getExpressionParsing().parseQualifiedTypeName(builder))
{
builder.error(JavaScriptBundle.message("javascript.parser.message.expected.typename"));
}
if(builder.getTokenType() == JSTokenTypes.EQ)
{
builder.advanceLexer();
checkMatches(builder, JSTokenTypes.STRING_LITERAL, JavaScriptBundle.message("javascript.parser.message.expected.string.literal"));
}
checkForSemicolon(builder);
useNSStatement.done(JSElementTypes.NAMESPACE_DECLARATION);
return true;
}
示例2: parseVarDeclaration
protected void parseVarDeclaration(final PsiBuilder builder, boolean allowIn)
{
if(!JSTokenTypes.IDENTIFIER_TOKENS_SET.contains(builder.getTokenType()))
{
builder.error(JavaScriptBundle.message("javascript.parser.message.expected.variable.name"));
builder.advanceLexer();
return;
}
PsiBuilder.Marker var = builder.mark();
builder.advanceLexer();
getExpressionParsing().tryParseType(builder);
if(builder.getTokenType() == JSTokenTypes.EQ)
{
builder.advanceLexer();
if(allowIn)
{
if(!getExpressionParsing().parseAssignmentExpression(builder))
{
builder.error(JavaScriptBundle.message("javascript.parser.message.expected.expression"));
}
}
else
{
if(!getExpressionParsing().parseAssignmentExpressionNoIn(builder))
{
builder.error(JavaScriptBundle.message("javascript.parser.message.expected.expression"));
}
}
}
var.done(JSElementTypes.VARIABLE);
}
示例3: parseParameter
public void parseParameter(@NotNull PsiBuilder builder, @Nullable PsiBuilder.Marker parameterMarker)
{
if(parameterMarker == null)
{
parameterMarker = builder.mark();
}
if(builder.getTokenType() == JSTokenTypes.DOT_DOT_DOT)
{
builder.advanceLexer();
}
if(builder.getTokenType() == JSTokenTypes.IDENTIFIER)
{
builder.advanceLexer();
getExpressionParsing().tryParseType(builder);
if(builder.getTokenType() == JSTokenTypes.EQ)
{
builder.advanceLexer();
getExpressionParsing().parseSimpleExpression(builder);
}
parameterMarker.done(JSElementTypes.FORMAL_PARAMETER);
}
else
{
builder.error(JavaScriptBundle.message("javascript.parser.message.expected.formal.parameter.name"));
parameterMarker.drop();
}
}
示例4: visitVariable
@Override
public void visitVariable(final ASTNode node)
{
if(type1 == JSTokenTypes.EQ || type2 == JSTokenTypes.EQ)
{ // Initializer
setSingleSpace(mySettings.SPACE_AROUND_ASSIGNMENT_OPERATORS);
}
}
示例5: getExpressionAccess
@Override
public Access getExpressionAccess(PsiElement expression)
{
expression = expression.getParent();
if(expression instanceof JSDefinitionExpression)
{
PsiElement grandParent = expression.getParent();
if(grandParent instanceof JSAssignmentExpression && ((JSAssignmentExpression) grandParent).getOperationSign() == JSTokenTypes.EQ)
{
return Access.Write;
}
return Access.ReadWrite;
}
if(expression instanceof JSPrefixExpression)
{
if(isIncrementOrDecrement(((JSPrefixExpression) expression).getOperationSign()))
{
return Access.ReadWrite;
}
}
else if(expression instanceof JSPostfixExpression)
{
if(isIncrementOrDecrement(((JSPostfixExpression) expression).getOperationSign()))
{
return Access.ReadWrite;
}
}
return Access.Read;
}
示例6: parseVarDeclaration
@Override
protected void parseVarDeclaration(final PsiBuilder builder, boolean allowIn)
{
if(!JSTokenTypes.IDENTIFIER_TOKENS_SET.contains(builder.getTokenType()))
{
builder.error(JavaScriptBundle.message("javascript.parser.message.expected.variable.name"));
builder.advanceLexer();
return;
}
PsiBuilder.Marker var = builder.mark();
getExpressionParsing().parseQualifiedTypeName(builder, false);
getExpressionParsing().tryParseType(builder);
if(builder.getTokenType() == JSTokenTypes.EQ)
{
builder.advanceLexer();
if(allowIn)
{
if(!getExpressionParsing().parseAssignmentExpression(builder))
{
builder.error(JavaScriptBundle.message("javascript.parser.message.expected.expression"));
}
}
else
{
if(!getExpressionParsing().parseAssignmentExpressionNoIn(builder))
{
builder.error(JavaScriptBundle.message("javascript.parser.message.expected.expression"));
}
}
}
var.done(JSElementTypes.VARIABLE);
}
示例7: parseImportStatement
private void parseImportStatement(final PsiBuilder builder)
{
final PsiBuilder.Marker importStatement = builder.mark();
try
{
builder.advanceLexer();
final PsiBuilder.Marker nsAssignment = builder.mark();
if(!getExpressionParsing().parseQualifiedTypeName(builder, true))
{
builder.error(JavaScriptBundle.message("javascript.parser.message.expected.typename"));
nsAssignment.drop();
return;
}
if(builder.getTokenType() == JSTokenTypes.EQ)
{
builder.advanceLexer();
if(!getExpressionParsing().parseQualifiedTypeName(builder))
{
builder.error(JavaScriptBundle.message("javascript.parser.message.expected.typename"));
}
nsAssignment.done(JSElementTypes.ASSIGNMENT_EXPRESSION);
}
else
{
nsAssignment.drop();
}
checkForSemicolon(builder);
}
finally
{
importStatement.done(JSElementTypes.IMPORT_STATEMENT);
}
}