mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Cosmetics.
This commit is contained in:
parent
411047a2e4
commit
60322d05d5
5 changed files with 57 additions and 59 deletions
|
@ -137,19 +137,19 @@ public class CPPASTArraySubscriptExpression extends ASTNode implements ICPPASTAr
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( arrayExpression != null )
|
if (arrayExpression != null && !arrayExpression.accept(action))
|
||||||
if( !arrayExpression.accept( action ) ) return false;
|
return false;
|
||||||
|
|
||||||
IASTImplicitName[] implicits = action.shouldVisitImplicitNames ? getImplicitNames() : null;
|
IASTImplicitName[] implicits = action.shouldVisitImplicitNames ? getImplicitNames() : null;
|
||||||
|
|
||||||
if(implicits != null && implicits.length > 0)
|
if (implicits != null && implicits.length > 0 && !implicits[0].accept(action))
|
||||||
if(!implicits[0].accept(action)) return false;
|
return false;
|
||||||
|
|
||||||
if( subscriptExp != null )
|
if (subscriptExp != null && !subscriptExp.accept(action))
|
||||||
if( !subscriptExp.accept( action ) ) return false;
|
return false;
|
||||||
|
|
||||||
if(implicits != null && implicits.length > 0)
|
if (implicits != null && implicits.length > 0 && !implicits[1].accept(action))
|
||||||
if(!implicits[1].accept(action)) return false;
|
return false;
|
||||||
|
|
||||||
if (action.shouldVisitExpressions) {
|
if (action.shouldVisitExpressions) {
|
||||||
switch (action.leave(this)) {
|
switch (action.leave(this)) {
|
||||||
|
@ -162,14 +162,12 @@ public class CPPASTArraySubscriptExpression extends ASTNode implements ICPPASTAr
|
||||||
}
|
}
|
||||||
|
|
||||||
public void replace(IASTNode child, IASTNode other) {
|
public void replace(IASTNode child, IASTNode other) {
|
||||||
if( child == subscriptExp )
|
if (child == subscriptExp) {
|
||||||
{
|
|
||||||
other.setPropertyInParent(child.getPropertyInParent());
|
other.setPropertyInParent(child.getPropertyInParent());
|
||||||
other.setParent(child.getParent());
|
other.setParent(child.getParent());
|
||||||
subscriptExp = (IASTExpression) other;
|
subscriptExp = (IASTExpression) other;
|
||||||
}
|
}
|
||||||
if( child == arrayExpression )
|
if (child == arrayExpression) {
|
||||||
{
|
|
||||||
other.setPropertyInParent(child.getPropertyInParent());
|
other.setPropertyInParent(child.getPropertyInParent());
|
||||||
other.setParent(child.getParent());
|
other.setParent(child.getParent());
|
||||||
arrayExpression = (IASTExpression) other;
|
arrayExpression = (IASTExpression) other;
|
||||||
|
|
|
@ -154,15 +154,18 @@ public class CPPASTFieldReference extends ASTNode implements ICPPASTFieldReferen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (owner != null && !owner.accept(action)) return false;
|
if (owner != null && !owner.accept(action))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (action.shouldVisitImplicitNames) {
|
if (action.shouldVisitImplicitNames) {
|
||||||
for (IASTImplicitName name : getImplicitNames()) {
|
for (IASTImplicitName name : getImplicitNames()) {
|
||||||
if(!name.accept(action)) return false;
|
if (!name.accept(action))
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name != null && !name.accept(action)) return false;
|
if (name != null && !name.accept(action))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (action.shouldVisitExpressions) {
|
if (action.shouldVisitExpressions) {
|
||||||
switch (action.leave(this)) {
|
switch (action.leave(this)) {
|
||||||
|
|
|
@ -164,8 +164,7 @@ public class CPPASTFunctionCallExpression extends ASTNode implements
|
||||||
|
|
||||||
IASTImplicitName[] implicits = action.shouldVisitImplicitNames ? getImplicitNames() : null;
|
IASTImplicitName[] implicits = action.shouldVisitImplicitNames ? getImplicitNames() : null;
|
||||||
|
|
||||||
if (implicits != null && implicits.length > 0)
|
if (implicits != null && implicits.length > 0 && !implicits[0].accept(action))
|
||||||
if (!implicits[0].accept(action))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (IASTInitializerClause arg : fArguments) {
|
for (IASTInitializerClause arg : fArguments) {
|
||||||
|
@ -173,8 +172,7 @@ public class CPPASTFunctionCallExpression extends ASTNode implements
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (implicits != null && implicits.length > 0)
|
if (implicits != null && implicits.length > 0 && !implicits[1].accept(action))
|
||||||
if (!implicits[1].accept(action))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (action.shouldVisitExpressions && action.leave(this) == ASTVisitor.PROCESS_ABORT)
|
if (action.shouldVisitExpressions && action.leave(this) == ASTVisitor.PROCESS_ABORT)
|
||||||
|
|
|
@ -162,7 +162,6 @@ public class CPPASTNewExpression extends ASTNode implements ICPPASTNewExpression
|
||||||
return t instanceof IArrayType;
|
return t instanceof IArrayType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean accept(ASTVisitor action) {
|
public boolean accept(ASTVisitor action) {
|
||||||
if (action.shouldVisitExpressions) {
|
if (action.shouldVisitExpressions) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue