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


Java IASTStandardFunctionDeclarator类代码示例

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


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

示例1: visit

import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator; //导入依赖的package包/类
@Override
	public int visit(IASTDeclarator node) {
		/* ********************************************************************************************
		 * BE CAREFULL: The order of the tests is important because choices are not mutually exclusive
		 * ex: ICPPASTFunctionDeclarator is a sub-interface of IASTFunctionDeclarator
		 * ******************************************************************************************** */
		if (node instanceof ICPPASTFunctionDeclarator) {
			return this.visit((ICPPASTFunctionDeclarator)node);
		}
		else if (node instanceof IASTStandardFunctionDeclarator) {
			return this.visit((IASTStandardFunctionDeclarator)node);
		}
		else if (node instanceof ICASTKnRFunctionDeclarator) {
			return this.visit((ICASTKnRFunctionDeclarator)node);
		}
		else if (node instanceof IASTFunctionDeclarator) {
			return this.visit((IASTFunctionDeclarator)node);
		}
		else if (node instanceof IASTFieldDeclarator) {  // actually seems to never occur ???
			return this.visit((IASTFieldDeclarator)node);
		}
/* removed to deal with C attributes: IASTDeclarators
  		else if (node instanceof ICPPASTDeclarator) {
			return this.visit((ICPPASTDeclarator)node);
		}
	replaced by the following:
*/	
  		else {
			return this.visitInternal(node);
		}
	}
 
开发者ID:Synectique,项目名称:VerveineC-Cpp,代码行数:32,代码来源:AbstractDispatcherVisitor.java

示例2: visit

import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator; //导入依赖的package包/类
@Override
protected int visit(IASTStandardFunctionDeclarator node) {
	// name
	signature = new QualifiedName(node.getName()).unqualifiedName();
	// parameters
	visitParameters(node.getParameters());
	// return type
	visitParent(node.getParent());

	return PROCESS_SKIP;
}
 
开发者ID:Synectique,项目名称:VerveineC-Cpp,代码行数:12,代码来源:SignatureBuilderVisitor.java

示例3: visit

import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator; //导入依赖的package包/类
@Override
protected int visit(IASTStandardFunctionDeclarator node) {

	// get node name and bnd
	super.visit( node);
	if (nodeBnd instanceof IVariable) {
		// declaration of a function pointer such as var in "int (*var)(int param1, char param2)"
		returnedEntity = null;
	}
	else {
		returnedEntity = visitFunctionDeclarator(node, node.getParameters());
	}

	return PROCESS_SKIP;
}
 
开发者ID:Synectique,项目名称:VerveineC-Cpp,代码行数:16,代码来源:BehaviouralDefVisitor.java

示例4: visit

import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator; //导入依赖的package包/类
public int visit(IASTFunctionDeclarator declarator) {
	if (declarator instanceof IASTStandardFunctionDeclarator)
		visit((IASTStandardFunctionDeclarator) declarator);
	else if (declarator instanceof ICASTKnRFunctionDeclarator)
		visit((ICASTKnRFunctionDeclarator) declarator);
	else
		throw new RuntimeException(
				"Unknown FunctionDeclarator subtype " + declarator.getClass().getName() + ". Exiting");
	return PROCESS_ABORT;
}
 
开发者ID:cwi-swat,项目名称:clair,代码行数:11,代码来源:Parser.java

示例5: testExample

import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator; //导入依赖的package包/类
public void testExample() {
    IASTTranslationUnit translationUnit = parseC(getCommentAbove());
    IASTSimpleDeclaration simpleDeclaration = (IASTSimpleDeclaration) translationUnit.getDeclarations()[2];
    IASTStandardFunctionDeclarator functionDeclarator = (IASTStandardFunctionDeclarator) simpleDeclaration.getDeclarators()[0];
    // __P((A *))
    assertTrue(functionDeclarator.getParameters()[0].getDeclSpecifier() instanceof ICASTTypedefNameSpecifier);
}
 
开发者ID:magicsky,项目名称:sya,代码行数:8,代码来源:ICASTTypedefNameSpecifierExample.java

示例6: testExample

import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator; //导入依赖的package包/类
public void testExample() {
    IASTTranslationUnit translationUnit = parseCPP(getCommentAbove());
    IASTSimpleDeclaration simpleDeclaration = (IASTSimpleDeclaration) translationUnit.getDeclarations()[0];
    // (*pfi)()
    assertTrue(simpleDeclaration.getDeclarators()[0] instanceof IASTStandardFunctionDeclarator);
}
 
开发者ID:magicsky,项目名称:sya,代码行数:7,代码来源:IASTStandardFunctionDeclaratorExample.java

示例7: visit

import org.eclipse.cdt.core.dom.ast.IASTStandardFunctionDeclarator; //导入依赖的package包/类
@Override
protected int visit(IASTStandardFunctionDeclarator node) {
	BehaviouralEntity fmx;

	processFunctionDeclarator(node);
	fmx = (BehaviouralEntity) returnedEntity;

	visitParameters(node.getParameters(), fmx);

	returnedEntity = fmx;

	return PROCESS_SKIP;
}
 
开发者ID:Synectique,项目名称:VerveineC-Cpp,代码行数:14,代码来源:DeclaredTypeRefVisitor.java


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