mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
be2cedef32
commit
048e36a160
1 changed files with 15 additions and 13 deletions
|
@ -26,9 +26,8 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
|
||||||
/**
|
/**
|
||||||
* Definition of a namespace.
|
* Definition of a namespace.
|
||||||
*/
|
*/
|
||||||
public class CPPASTNamespaceDefinition extends ASTNode implements
|
public class CPPASTNamespaceDefinition extends ASTNode
|
||||||
ICPPASTNamespaceDefinition, IASTAmbiguityParent {
|
implements ICPPASTNamespaceDefinition, IASTAmbiguityParent {
|
||||||
|
|
||||||
private IASTName fName;
|
private IASTName fName;
|
||||||
private IASTDeclaration[] fAllDeclarations;
|
private IASTDeclaration[] fAllDeclarations;
|
||||||
private IASTDeclaration[] fActiveDeclarations;
|
private IASTDeclaration[] fActiveDeclarations;
|
||||||
|
@ -47,11 +46,12 @@ public class CPPASTNamespaceDefinition extends ASTNode implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public CPPASTNamespaceDefinition copy(CopyStyle style) {
|
public CPPASTNamespaceDefinition copy(CopyStyle style) {
|
||||||
CPPASTNamespaceDefinition copy = new CPPASTNamespaceDefinition(fName == null ? null
|
CPPASTNamespaceDefinition copy =
|
||||||
: fName.copy(style));
|
new CPPASTNamespaceDefinition(fName == null ? null : fName.copy(style));
|
||||||
copy.fIsInline = fIsInline;
|
copy.fIsInline = fIsInline;
|
||||||
for (IASTDeclaration declaration : getDeclarations())
|
for (IASTDeclaration declaration : getDeclarations()) {
|
||||||
copy.addDeclaration(declaration == null ? null : declaration.copy(style));
|
copy.addDeclaration(declaration == null ? null : declaration.copy(style));
|
||||||
|
}
|
||||||
copy.setOffsetAndLength(this);
|
copy.setOffsetAndLength(this);
|
||||||
if (style == CopyStyle.withLocations) {
|
if (style == CopyStyle.withLocations) {
|
||||||
copy.setCopyLocation(this);
|
copy.setCopyLocation(this);
|
||||||
|
@ -126,7 +126,8 @@ public class CPPASTNamespaceDefinition extends ASTNode implements
|
||||||
|
|
||||||
IASTDeclaration [] decls = getDeclarations(action.includeInactiveNodes);
|
IASTDeclaration [] decls = getDeclarations(action.includeInactiveNodes);
|
||||||
for (IASTDeclaration decl : decls) {
|
for (IASTDeclaration decl : decls) {
|
||||||
if (!decl.accept(action)) return false;
|
if (!decl.accept(action))
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action.shouldVisitNamespaces && action.leave(this) == ASTVisitor.PROCESS_ABORT)
|
if (action.shouldVisitNamespaces && action.leave(this) == ASTVisitor.PROCESS_ABORT)
|
||||||
|
@ -136,7 +137,8 @@ public class CPPASTNamespaceDefinition extends ASTNode implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRoleForName(IASTName n) {
|
public int getRoleForName(IASTName n) {
|
||||||
if( fName == n ) return r_definition;
|
if (fName == n)
|
||||||
|
return r_definition;
|
||||||
return r_unclear;
|
return r_unclear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue