本文整理汇总了Java中org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition类的典型用法代码示例。如果您正苦于以下问题:Java ICPPASTNamespaceDefinition类的具体用法?Java ICPPASTNamespaceDefinition怎么用?Java ICPPASTNamespaceDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ICPPASTNamespaceDefinition类属于org.eclipse.cdt.core.dom.ast.cpp包,在下文中一共展示了ICPPASTNamespaceDefinition类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: visit
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; //导入依赖的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
示例2: visit
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; //导入依赖的package包/类
@Override
public int visit(ICPPASTNamespaceDefinition namespaceDefinition) {
ISourceLocation loc = getSourceLocation(namespaceDefinition);
ISourceLocation decl = br.resolveBinding(namespaceDefinition);
IList attributes = getAttributes(namespaceDefinition);
namespaceDefinition.getName().accept(this);
IConstructor name = stack.pop();
IListWriter declarations = vf.listWriter();
Stream.of(namespaceDefinition.getDeclarations()).forEach(it -> {
it.accept(this);
declarations.append(stack.pop());
});
if (namespaceDefinition.isInline())
stack.push(builder.Declaration_namespaceDefinitionInline(attributes, name, declarations.done(), loc, decl));
else
stack.push(builder.Declaration_namespaceDefinition(attributes, name, declarations.done(), loc, decl));
return PROCESS_ABORT;
}
开发者ID:cwi-swat,项目名称:clair,代码行数:22,代码来源:Parser.java
示例3: testExample
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; //导入依赖的package包/类
public void testExample() {
IASTTranslationUnit translationUnit = parseCPP(getCommentAbove());
ICPPASTNamespaceDefinition namespaceDefinition = (ICPPASTNamespaceDefinition) translationUnit.getDeclarations()[0];
IASTSimpleDeclaration simpleDeclaration = (IASTSimpleDeclaration) namespaceDefinition.getDeclarations()[1];
// fs()
assertTrue(simpleDeclaration.getDeclarators()[0] instanceof ICPPASTFunctionDeclarator);
}
开发者ID:magicsky,项目名称:sya,代码行数:8,代码来源:ICPPASTFunctionDeclaratorExample.java
示例4: leave
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; //导入依赖的package包/类
@Override
public int leave(ICPPASTNamespaceDefinition node) {
getContext().pop();
return super.leave(node);
}
开发者ID:Synectique,项目名称:VerveineC-Cpp,代码行数:6,代码来源:AbstractVisitor.java
示例5: resolveBinding2
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; //导入依赖的package包/类
public ISourceLocation resolveBinding2(IASTNameOwner node) {
try {
if (node instanceof IASTCompositeTypeSpecifier)
return resolveCompositeTypeSpecifier((IASTCompositeTypeSpecifier) node);
if (node instanceof IASTDeclarator)
return resolveDeclarator((IASTDeclarator) node);
if (node instanceof IASTElaboratedTypeSpecifier)
return resolveElaboratedTypeSpecifier((IASTElaboratedTypeSpecifier) node);
if (node instanceof IASTEnumerationSpecifier)
return resolveEnumerationSpecifier((IASTEnumerationSpecifier) node);
if (node instanceof IASTEnumerator)
return resolveEnumerator((IASTEnumerator) node);
if (node instanceof IASTFieldReference)
return resolveFieldReference((IASTFieldReference) node);
if (node instanceof IASTGotoStatement)
return resolveGotoStatement((IASTGotoStatement) node);
if (node instanceof IASTIdExpression)
return resolveIdExpression((IASTIdExpression) node);
// Discouraged access
// if (node instanceof IASTInternalNameOwner)
// return resolveInternalNameOwner((IASTInternalNameOwner) node);
if (node instanceof IASTLabelStatement)
return resolveLabelStatement((IASTLabelStatement) node);
if (node instanceof IASTNamedTypeSpecifier)
return resolveNamedTypeSpecifier((IASTNamedTypeSpecifier) node);
if (node instanceof IASTPreprocessorMacroDefinition)// TODO
return resolvePreprocessorMacroDefinition((IASTPreprocessorMacroDefinition) node);
if (node instanceof ICPPASTAliasDeclaration)
return resolveAliasDeclaration((ICPPASTAliasDeclaration) node);
if (node instanceof ICPPASTBaseSpecifier)
return resolveBaseSpecifier((ICPPASTBaseSpecifier) node);
if (node instanceof ICPPASTCapture)
return resolveCapture((ICPPASTCapture) node);
if (node instanceof ICPPASTConstructorChainInitializer)
return resolveConstructorChainInitializer((ICPPASTConstructorChainInitializer) node);
if (node instanceof ICPPASTNamespaceAlias)
return resolveNamespaceAlias((ICPPASTNamespaceAlias) node);
if (node instanceof ICPPASTNamespaceDefinition)
return resolveNamespaceDefinition((ICPPASTNamespaceDefinition) node);
if (node instanceof ICPPASTPointerToMember)// TODO
return resolvePointerToMember((ICPPASTPointerToMember) node);
if (node instanceof ICPPASTQualifiedName)
return resolveQualifiedName((ICPPASTQualifiedName) node);
if (node instanceof ICPPASTSimpleTypeTemplateParameter)
return resolveSimpleTypeTemplateParameter((ICPPASTSimpleTypeTemplateParameter) node);
if (node instanceof ICPPASTTemplatedTypeTemplateParameter)// TODO,
// NYI
return resolveTemplatedTypeTemplateParameter((ICPPASTTemplatedTypeTemplateParameter) node);
if (node instanceof ICPPASTTemplateId)
return resolveTemplateId((ICPPASTTemplateId) node);
// Deprecated // TODO?
// if (node instanceof ICPPASTTypenameExpression)
// return resolveTypenameExpression((ICPPASTTypenameExpression)
// node);
if (node instanceof ICPPASTUsingDeclaration)
return resolveUsingDeclaration((ICPPASTUsingDeclaration) node);
if (node instanceof ICPPASTUsingDirective)
return resolveUsingDirective((ICPPASTUsingDirective) node);
// if (node instanceof IGNUASTGotoStatement)
// return resolveGnuGotoStatement((IGNUASTGotoStatement) node);
} catch (URISyntaxException e) {
err("Caught URISyntaxException, return UNKNOWN");
err(e.getMessage());
}
return makeBinding("UNKNOWN4", null, null);
}
开发者ID:cwi-swat,项目名称:clair,代码行数:67,代码来源:BindingsResolver.java
示例6: resolveNamespaceDefinition
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; //导入依赖的package包/类
private ISourceLocation resolveNamespaceDefinition(ICPPASTNamespaceDefinition node) throws URISyntaxException {
return resolveBinding(node.getName().resolveBinding());
}
开发者ID:cwi-swat,项目名称:clair,代码行数:4,代码来源:BindingsResolver.java
示例7: visit
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; //导入依赖的package包/类
@Override
public int visit(final ICPPASTNamespaceDefinition namespaceDefinition) {
preVisit(namespaceDefinition);
return super.visit(namespaceDefinition);
}
开发者ID:mast-group,项目名称:tassal,代码行数:6,代码来源:AbstractCdtASTAnnotatedTokenizer.java
示例8: visit
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; //导入依赖的package包/类
public int visit(ICPPASTNamespaceDefinition namespaceDefinition) {
namespaceDefinitions.add(namespaceDefinition);
return PROCESS_CONTINUE;
}
开发者ID:magicsky,项目名称:sya,代码行数:5,代码来源:CPPASTNamespaceDefinitionsVisitor.java
示例9: testExample
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; //导入依赖的package包/类
public void testExample() {
IASTTranslationUnit translationUnit = parseCPP(getCommentAbove());
assertTrue(translationUnit.getDeclarations()[0] instanceof ICPPASTNamespaceDefinition);
}
开发者ID:magicsky,项目名称:sya,代码行数:5,代码来源:ICPPASTNamespaceDefinitionExample.java
示例10: visit
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; //导入依赖的package包/类
@Override
public int visit(ICPPASTNamespaceDefinition node) {
Namespace fmx;
nodeBnd = resolver.getBinding(node.getName());
fmx = (Namespace) dico.getEntityByKey(nodeBnd);
getContext().push(fmx);
return PROCESS_CONTINUE;
}
开发者ID:Synectique,项目名称:VerveineC-Cpp,代码行数:13,代码来源:AbstractVisitor.java
注:本文中的org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论