当前位置: 首页>>代码示例>>Java>>正文


Java JSTokenTypes.EQ属性代码示例

本文整理汇总了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;
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:24,代码来源:EcmaScript4StatementParsing.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:35,代码来源:StatementParsing.java

示例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();
	}
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:29,代码来源:FunctionParsing.java

示例4: visitVariable

@Override
public void visitVariable(final ASTNode node)
{
	if(type1 == JSTokenTypes.EQ || type2 == JSTokenTypes.EQ)
	{ // Initializer
		setSingleSpace(mySettings.SPACE_AROUND_ASSIGNMENT_OPERATORS);
	}
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:8,代码来源:JSSpacingProcessor.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:30,代码来源:JSReadWriteAccessDetector.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:36,代码来源:EcmaScript4StatementParsing.java

示例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);
	}
}
 
开发者ID:consulo,项目名称:consulo-javascript,代码行数:37,代码来源:EcmaScript4StatementParsing.java


注:本文中的com.intellij.lang.javascript.JSTokenTypes.EQ属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。