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