本文整理汇总了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);
}
示例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;
}