mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Cosmetics.
This commit is contained in:
parent
c4dc0ee219
commit
aaa7803609
2 changed files with 45 additions and 53 deletions
|
@ -35,7 +35,6 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
|
|||
import org.eclipse.cdt.internal.core.dom.parser.ProblemType;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics;
|
||||
|
||||
|
||||
public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionList, IASTAmbiguityParent {
|
||||
private static final ICPPFunction[] NO_FUNCTIONS = new ICPPFunction[0];
|
||||
|
||||
|
@ -48,7 +47,6 @@ public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionLi
|
|||
private IASTImplicitName[] implicitNames;
|
||||
private ICPPFunction[] overloads = null;
|
||||
|
||||
|
||||
public CPPASTExpressionList copy() {
|
||||
CPPASTExpressionList copy = new CPPASTExpressionList();
|
||||
for(IASTExpression expr : getExpressions())
|
||||
|
@ -105,7 +103,6 @@ public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionLi
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns an array of implicit names where each element of the array
|
||||
* represents a comma between the expression in the same index and the
|
||||
|
@ -135,12 +132,10 @@ public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionLi
|
|||
return implicitNames;
|
||||
}
|
||||
|
||||
|
||||
public IASTImplicitName[] getImplicitNames() {
|
||||
return (IASTImplicitName[])ArrayUtil.removeNulls(IASTImplicitName.class, computeImplicitNames());
|
||||
}
|
||||
|
||||
|
||||
private ICPPFunction[] getOverloads() {
|
||||
if (overloads == null) {
|
||||
IASTExpression[] exprs = getExpressions();
|
||||
|
|
|
@ -25,7 +25,6 @@ public class CPPASTExpressionStatement extends ASTNode implements
|
|||
|
||||
private IASTExpression expression;
|
||||
|
||||
|
||||
public CPPASTExpressionStatement() {
|
||||
}
|
||||
|
||||
|
@ -62,7 +61,7 @@ public class CPPASTExpressionStatement extends ASTNode implements
|
|||
default: break;
|
||||
}
|
||||
}
|
||||
if( expression != null ) if( !expression.accept( action ) ) return false;
|
||||
if (expression != null && !expression.accept(action)) return false;
|
||||
if (action.shouldVisitExpressions) {
|
||||
switch (action.leave(this)) {
|
||||
case ASTVisitor.PROCESS_ABORT: return false;
|
||||
|
@ -74,12 +73,10 @@ public class CPPASTExpressionStatement extends ASTNode implements
|
|||
}
|
||||
|
||||
public void replace(IASTNode child, IASTNode other) {
|
||||
if( child == expression )
|
||||
{
|
||||
if (child == expression) {
|
||||
other.setPropertyInParent(child.getPropertyInParent());
|
||||
other.setParent(child.getParent());
|
||||
expression = (IASTExpression) other;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue