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


Java IASTDeclaration.accept方法代码示例

本文整理汇总了Java中org.eclipse.cdt.core.dom.ast.IASTDeclaration.accept方法的典型用法代码示例。如果您正苦于以下问题:Java IASTDeclaration.accept方法的具体用法?Java IASTDeclaration.accept怎么用?Java IASTDeclaration.accept使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.cdt.core.dom.ast.IASTDeclaration的用法示例。


在下文中一共展示了IASTDeclaration.accept方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

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

	/* Gets the key (IBinding) of the node to recover the famix type entity */
	super.visit(node);

	fmx = (Class) dico.getEntityByKey(nodeBnd);

	this.getContext().push(fmx);
	for (IASTDeclaration decl : node.getDeclarations(/*includeInactive*/true)) {
		decl.accept(this);
	}
	returnedEntity = getContext().pop();

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

示例2: visit

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

	/* Gets the key (IBinding) of the node to recover the famix type entity */
	super.visit(node);

	fmx = (Class) dico.getEntityByKey(nodeBnd);

	/*
	 * Visiting possible template methods
	 */
	this.getContext().push(fmx);
	for (IASTDeclaration decl : node.getDeclarations(/*includeInactive*/true)) {
		decl.accept(this);
	}
	returnedEntity = getContext().pop();

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

示例3: visit

import org.eclipse.cdt.core.dom.ast.IASTDeclaration; //导入方法依赖的package包/类
/** Visiting a struct in C
 * similar to C++ but no template
 */
@Override
protected int visit(ICASTCompositeTypeSpecifier node) {
	Class fmx;

	// compute nodeName and binding
	super.visit(node);
	fmx = dico.ensureFamixClass(nodeBnd, "struct "+nodeName.toString(), (ContainerEntity)getContext().top());

	fmx.setIsStub(false);  // used to say TRUE if could not find a binding. Not too sure ... 
	dico.addSourceAnchor(fmx, filename, node.getFileLocation());

	this.getContext().push(fmx);
	for (IASTDeclaration decl : node.getDeclarations(/*includeInactive*/true)) {
		decl.accept(this);
	}
	returnedEntity = getContext().pop();

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

示例4: visit

import org.eclipse.cdt.core.dom.ast.IASTDeclaration; //导入方法依赖的package包/类
@Override
public int visit(ICPPASTNamespaceDefinition node) {
	Namespace fmx;
	nodeName = node.getName();
	if (! nodeName.toString().equals("")) {
		nodeBnd = resolver.getBinding(nodeName);

		fmx = dico.ensureFamixNamespace(nodeBnd, nodeName.toString(), (Namespace) this.getContext().top());
		fmx.setIsStub(false);

		this.getContext().push(fmx);
	}

	for (IASTDeclaration decl : node.getDeclarations()) {
		decl.accept(this);
	}

	if (! nodeName.toString().equals("")) {
		getContext().pop();
	}

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

示例5: visit

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

	super.visit(node);
	fmx = (Class) dico.getEntityByKey(nodeBnd);

	this.getContext().push(fmx);
	for (IASTDeclaration decl : node.getDeclarations(/*includeInactive*/true)) {
		decl.accept(this);
	}
	returnedEntity = getContext().pop();

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

示例6: visit

import org.eclipse.cdt.core.dom.ast.IASTDeclaration; //导入方法依赖的package包/类
public int visit(IASTForStatement statement) {
	ISourceLocation loc = getSourceLocation(statement);
	IList attributes = getAttributes(statement);

	IASTStatement _initializer = statement.getInitializerStatement();
	IConstructor initializer;
	if (_initializer == null)
		initializer = builder.Expression_empty(loc);
	else {
		_initializer.accept(this);
		initializer = stack.pop();
	}

	IASTExpression _condition = statement.getConditionExpression();
	IConstructor condition;
	if (_condition == null)
		condition = builder.Expression_empty(loc);
	else {
		_condition.accept(this);
		condition = stack.pop();
	}

	IASTExpression _iteration = statement.getIterationExpression();
	IConstructor iteration;
	if (_iteration == null)
		iteration = builder.Expression_empty(loc);
	else {
		_iteration.accept(this);
		iteration = stack.pop();
	}

	statement.getBody().accept(this);
	IConstructor body = stack.pop();

	if (statement instanceof ICPPASTForStatement) {
		IASTDeclaration _conditionDeclaration = ((ICPPASTForStatement) statement).getConditionDeclaration();
		if (_conditionDeclaration != null) {
			_conditionDeclaration.accept(this);
			stack.push(builder.Statement_forWithDecl(attributes, initializer, stack.pop(), iteration, body, loc));
			return PROCESS_ABORT;
		}
	}
	stack.push(builder.Statement_for(attributes, initializer, condition, iteration, body, loc));
	return PROCESS_ABORT;
}
 
开发者ID:cwi-swat,项目名称:clair,代码行数:46,代码来源:Parser.java


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