mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +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.ProblemType;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics;
|
||||||
|
|
||||||
|
|
||||||
public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionList, IASTAmbiguityParent {
|
public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionList, IASTAmbiguityParent {
|
||||||
private static final ICPPFunction[] NO_FUNCTIONS = new ICPPFunction[0];
|
private static final ICPPFunction[] NO_FUNCTIONS = new ICPPFunction[0];
|
||||||
|
|
||||||
|
@ -48,7 +47,6 @@ public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionLi
|
||||||
private IASTImplicitName[] implicitNames;
|
private IASTImplicitName[] implicitNames;
|
||||||
private ICPPFunction[] overloads = null;
|
private ICPPFunction[] overloads = null;
|
||||||
|
|
||||||
|
|
||||||
public CPPASTExpressionList copy() {
|
public CPPASTExpressionList copy() {
|
||||||
CPPASTExpressionList copy = new CPPASTExpressionList();
|
CPPASTExpressionList copy = new CPPASTExpressionList();
|
||||||
for(IASTExpression expr : getExpressions())
|
for(IASTExpression expr : getExpressions())
|
||||||
|
@ -105,7 +103,6 @@ public class CPPASTExpressionList extends ASTNode implements ICPPASTExpressionLi
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of implicit names where each element of the array
|
* Returns an array of implicit names where each element of the array
|
||||||
* represents a comma between the expression in the same index and the
|
* 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;
|
return implicitNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public IASTImplicitName[] getImplicitNames() {
|
public IASTImplicitName[] getImplicitNames() {
|
||||||
return (IASTImplicitName[])ArrayUtil.removeNulls(IASTImplicitName.class, computeImplicitNames());
|
return (IASTImplicitName[])ArrayUtil.removeNulls(IASTImplicitName.class, computeImplicitNames());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private ICPPFunction[] getOverloads() {
|
private ICPPFunction[] getOverloads() {
|
||||||
if (overloads == null) {
|
if (overloads == null) {
|
||||||
IASTExpression[] exprs = getExpressions();
|
IASTExpression[] exprs = getExpressions();
|
||||||
|
|
|
@ -25,7 +25,6 @@ public class CPPASTExpressionStatement extends ASTNode implements
|
||||||
|
|
||||||
private IASTExpression expression;
|
private IASTExpression expression;
|
||||||
|
|
||||||
|
|
||||||
public CPPASTExpressionStatement() {
|
public CPPASTExpressionStatement() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +61,7 @@ public class CPPASTExpressionStatement extends ASTNode implements
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( expression != null ) if( !expression.accept( action ) ) return false;
|
if (expression != null && !expression.accept(action)) return false;
|
||||||
if (action.shouldVisitExpressions) {
|
if (action.shouldVisitExpressions) {
|
||||||
switch (action.leave(this)) {
|
switch (action.leave(this)) {
|
||||||
case ASTVisitor.PROCESS_ABORT: return false;
|
case ASTVisitor.PROCESS_ABORT: return false;
|
||||||
|
@ -74,12 +73,10 @@ public class CPPASTExpressionStatement extends ASTNode implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public void replace(IASTNode child, IASTNode other) {
|
public void replace(IASTNode child, IASTNode other) {
|
||||||
if( child == expression )
|
if (child == expression) {
|
||||||
{
|
|
||||||
other.setPropertyInParent(child.getPropertyInParent());
|
other.setPropertyInParent(child.getPropertyInParent());
|
||||||
other.setParent(child.getParent());
|
other.setParent(child.getParent());
|
||||||
expression = (IASTExpression) other;
|
expression = (IASTExpression) other;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue