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


Java ICPPASTNewExpression类代码示例

本文整理汇总了Java中org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression的典型用法代码示例。如果您正苦于以下问题:Java ICPPASTNewExpression类的具体用法?Java ICPPASTNewExpression怎么用?Java ICPPASTNewExpression使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ICPPASTNewExpression类属于org.eclipse.cdt.core.dom.ast.cpp包,在下文中一共展示了ICPPASTNewExpression类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression; //导入依赖的package包/类
@Override
public int visit(IASTExpression node) {
	if (node instanceof IASTFieldReference) {
		return visit((IASTFieldReference)node);
	}
	else if (node instanceof IASTIdExpression) {
		return visit((IASTIdExpression)node);
	}
	else if (node instanceof ICPPASTNewExpression) {
		return visit((ICPPASTNewExpression)node);
	}
	else if (node instanceof IASTFunctionCallExpression) {
		return visit((IASTFunctionCallExpression)node);
	}
	else if (node instanceof IASTUnaryExpression) {
		return visit((IASTUnaryExpression)node);   // to check whether this is an assignement
	}
	else if (node instanceof IASTBinaryExpression) {
		return visit((IASTBinaryExpression)node);   // to check whether this is an assignement
	}
	else if (node instanceof IASTLiteralExpression) {
		return visit((IASTLiteralExpression)node);
	}
	else if (node instanceof IASTTypeIdExpression) {
		return visit((IASTTypeIdExpression)node);
	}
	else if (node instanceof IASTCastExpression) {
		return visit((IASTCastExpression)node);
	}

	return super.visit(node);
}
 
开发者ID:Synectique,项目名称:VerveineC-Cpp,代码行数:33,代码来源:AbstractDispatcherVisitor.java

示例2: visit

import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNewExpression; //导入依赖的package包/类
@Override
public int visit(IASTExpression expression) {
	if (expression instanceof IASTArraySubscriptExpression)
		visit((IASTArraySubscriptExpression) expression);
	else if (expression instanceof IASTBinaryExpression)
		visit((IASTBinaryExpression) expression);
	else if (expression instanceof IASTBinaryTypeIdExpression)// TODO
		visit((IASTBinaryTypeIdExpression) expression);
	else if (expression instanceof IASTCastExpression)
		visit((IASTCastExpression) expression);
	else if (expression instanceof IASTConditionalExpression)
		visit((IASTConditionalExpression) expression);
	else if (expression instanceof IASTExpressionList)// TODO
		visit((IASTExpressionList) expression);
	else if (expression instanceof IASTFieldReference)// TODO
		visit((IASTFieldReference) expression);
	else if (expression instanceof IASTFunctionCallExpression)
		visit((IASTFunctionCallExpression) expression);
	else if (expression instanceof IASTIdExpression)
		visit((IASTIdExpression) expression);
	else if (expression instanceof IASTLiteralExpression)
		visit((IASTLiteralExpression) expression);
	else if (expression instanceof IASTTypeIdExpression)
		visit((IASTTypeIdExpression) expression);
	else if (expression instanceof IASTTypeIdInitializerExpression)
		visit((IASTTypeIdInitializerExpression) expression);
	else if (expression instanceof IASTUnaryExpression)
		visit((IASTUnaryExpression) expression);
	else if (expression instanceof ICPPASTArraySubscriptExpression)
		visit((ICPPASTArraySubscriptExpression) expression);
	else if (expression instanceof ICPPASTBinaryExpression)
		// Move up
		visit((ICPPASTBinaryExpression) expression);
	else if (expression instanceof ICPPASTCastExpression)
		visit((ICPPASTCastExpression) expression);
	else if (expression instanceof ICPPASTDeleteExpression)
		visit((ICPPASTDeleteExpression) expression);
	else if (expression instanceof ICPPASTExpressionList)
		visit((ICPPASTExpressionList) expression);
	else if (expression instanceof ICPPASTFieldReference)
		visit((ICPPASTFieldReference) expression);
	else if (expression instanceof ICPPASTFunctionCallExpression)
		visit((ICPPASTFunctionCallExpression) expression);
	else if (expression instanceof ICPPASTLambdaExpression)
		visit((ICPPASTLambdaExpression) expression);
	else if (expression instanceof ICPPASTLiteralExpression)
		visit((ICPPASTLiteralExpression) expression);
	else if (expression instanceof ICPPASTNaryTypeIdExpression)
		visit((ICPPASTNaryTypeIdExpression) expression);
	else if (expression instanceof ICPPASTNewExpression)
		visit((ICPPASTNewExpression) expression);
	else if (expression instanceof ICPPASTPackExpansionExpression)
		visit((ICPPASTPackExpansionExpression) expression);
	else if (expression instanceof ICPPASTSimpleTypeConstructorExpression)
		visit((ICPPASTSimpleTypeConstructorExpression) expression);
	else if (expression instanceof ICPPASTTypeIdExpression)
		visit((ICPPASTTypeIdExpression) expression);
	else if (expression instanceof ICPPASTUnaryExpression)
		visit((ICPPASTUnaryExpression) expression);
	else if (expression instanceof IASTProblemExpression)
		// Should not happen
		visit((IASTProblemExpression) expression);
	else {
		throw new RuntimeException(
				"Expression: encountered non-implemented subtype " + expression.getClass().getName());
	}
	return PROCESS_ABORT;
}
 
开发者ID:cwi-swat,项目名称:clair,代码行数:69,代码来源:Parser.java


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