mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 10:45:37 +02:00
Cosmetics.
This commit is contained in:
parent
73175131ff
commit
1012380fa8
1 changed files with 23 additions and 28 deletions
|
@ -54,7 +54,6 @@ public class CPPASTDeclarator extends ASTNode implements ICPPASTDeclarator {
|
|||
setInitializer(initializer);
|
||||
}
|
||||
|
||||
|
||||
public CPPASTDeclarator copy() {
|
||||
CPPASTDeclarator copy = new CPPASTDeclarator();
|
||||
copyBaseDeclarator(copy);
|
||||
|
@ -66,7 +65,7 @@ public class CPPASTDeclarator extends ASTNode implements ICPPASTDeclarator {
|
|||
copy.setInitializer(initializer == null ? null : initializer.copy());
|
||||
copy.setNestedDeclarator(nested == null ? null : nested.copy());
|
||||
copy.isPackExpansion= isPackExpansion;
|
||||
for(IASTPointerOperator pointer : getPointerOperators())
|
||||
for (IASTPointerOperator pointer : getPointerOperators())
|
||||
copy.addPointerOperator(pointer == null ? null : pointer.copy());
|
||||
copy.setOffsetAndLength(this);
|
||||
}
|
||||
|
@ -137,7 +136,7 @@ public class CPPASTDeclarator extends ASTNode implements ICPPASTDeclarator {
|
|||
@Override
|
||||
public boolean accept(ASTVisitor action) {
|
||||
if (action.shouldVisitDeclarators) {
|
||||
switch(action.visit(this)) {
|
||||
switch (action.visit(this)) {
|
||||
case ASTVisitor.PROCESS_ABORT: return false;
|
||||
case ASTVisitor.PROCESS_SKIP: return true;
|
||||
default : break;
|
||||
|
@ -174,13 +173,9 @@ public class CPPASTDeclarator extends ASTNode implements ICPPASTDeclarator {
|
|||
}
|
||||
|
||||
protected boolean postAccept(ASTVisitor action) {
|
||||
if (initializer != null && !initializer.accept(action))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return initializer == null || initializer.accept(action);
|
||||
}
|
||||
|
||||
|
||||
public int getRoleForName(IASTName n) {
|
||||
// 3.1.2
|
||||
IASTNode parent = ASTQueries.findOutermostDeclarator(this).getParent();
|
||||
|
|
Loading…
Add table
Reference in a new issue