mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 03:05:39 +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);
|
setInitializer(initializer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public CPPASTDeclarator copy() {
|
public CPPASTDeclarator copy() {
|
||||||
CPPASTDeclarator copy = new CPPASTDeclarator();
|
CPPASTDeclarator copy = new CPPASTDeclarator();
|
||||||
copyBaseDeclarator(copy);
|
copyBaseDeclarator(copy);
|
||||||
|
@ -66,7 +65,7 @@ public class CPPASTDeclarator extends ASTNode implements ICPPASTDeclarator {
|
||||||
copy.setInitializer(initializer == null ? null : initializer.copy());
|
copy.setInitializer(initializer == null ? null : initializer.copy());
|
||||||
copy.setNestedDeclarator(nested == null ? null : nested.copy());
|
copy.setNestedDeclarator(nested == null ? null : nested.copy());
|
||||||
copy.isPackExpansion= isPackExpansion;
|
copy.isPackExpansion= isPackExpansion;
|
||||||
for(IASTPointerOperator pointer : getPointerOperators())
|
for (IASTPointerOperator pointer : getPointerOperators())
|
||||||
copy.addPointerOperator(pointer == null ? null : pointer.copy());
|
copy.addPointerOperator(pointer == null ? null : pointer.copy());
|
||||||
copy.setOffsetAndLength(this);
|
copy.setOffsetAndLength(this);
|
||||||
}
|
}
|
||||||
|
@ -137,7 +136,7 @@ public class CPPASTDeclarator extends ASTNode implements ICPPASTDeclarator {
|
||||||
@Override
|
@Override
|
||||||
public boolean accept(ASTVisitor action) {
|
public boolean accept(ASTVisitor action) {
|
||||||
if (action.shouldVisitDeclarators) {
|
if (action.shouldVisitDeclarators) {
|
||||||
switch(action.visit(this)) {
|
switch (action.visit(this)) {
|
||||||
case ASTVisitor.PROCESS_ABORT: return false;
|
case ASTVisitor.PROCESS_ABORT: return false;
|
||||||
case ASTVisitor.PROCESS_SKIP: return true;
|
case ASTVisitor.PROCESS_SKIP: return true;
|
||||||
default : break;
|
default : break;
|
||||||
|
@ -174,13 +173,9 @@ public class CPPASTDeclarator extends ASTNode implements ICPPASTDeclarator {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean postAccept(ASTVisitor action) {
|
protected boolean postAccept(ASTVisitor action) {
|
||||||
if (initializer != null && !initializer.accept(action))
|
return initializer == null || initializer.accept(action);
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int getRoleForName(IASTName n) {
|
public int getRoleForName(IASTName n) {
|
||||||
// 3.1.2
|
// 3.1.2
|
||||||
IASTNode parent = ASTQueries.findOutermostDeclarator(this).getParent();
|
IASTNode parent = ASTQueries.findOutermostDeclarator(this).getParent();
|
||||||
|
|
Loading…
Add table
Reference in a new issue