mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
e4966b7c0c
commit
e2cbee5c2b
1 changed files with 13 additions and 13 deletions
|
@ -38,7 +38,7 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
|
||||||
private int op;
|
private int op;
|
||||||
private ICPPASTExpression operand1;
|
private ICPPASTExpression operand1;
|
||||||
private ICPPASTInitializerClause operand2;
|
private ICPPASTInitializerClause operand2;
|
||||||
|
|
||||||
private ICPPEvaluation evaluation;
|
private ICPPEvaluation evaluation;
|
||||||
private IASTImplicitName[] implicitNames = null;
|
private IASTImplicitName[] implicitNames = null;
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
|
||||||
public CPPASTBinaryExpression copy() {
|
public CPPASTBinaryExpression copy() {
|
||||||
return copy(CopyStyle.withoutLocations);
|
return copy(CopyStyle.withoutLocations);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CPPASTBinaryExpression copy(CopyStyle style) {
|
public CPPASTBinaryExpression copy(CopyStyle style) {
|
||||||
CPPASTBinaryExpression copy = new CPPASTBinaryExpression();
|
CPPASTBinaryExpression copy = new CPPASTBinaryExpression();
|
||||||
|
@ -99,7 +99,7 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
|
||||||
if (expression != null) {
|
if (expression != null) {
|
||||||
if (!(expression instanceof ICPPASTExpression))
|
if (!(expression instanceof ICPPASTExpression))
|
||||||
throw new IllegalArgumentException(expression.getClass().getName());
|
throw new IllegalArgumentException(expression.getClass().getName());
|
||||||
|
|
||||||
expression.setParent(this);
|
expression.setParent(this);
|
||||||
expression.setPropertyInParent(OPERAND_ONE);
|
expression.setPropertyInParent(OPERAND_ONE);
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
|
||||||
if (operand1 instanceof IASTBinaryExpression || operand2 instanceof IASTBinaryExpression) {
|
if (operand1 instanceof IASTBinaryExpression || operand2 instanceof IASTBinaryExpression) {
|
||||||
return acceptWithoutRecursion(this, action);
|
return acceptWithoutRecursion(this, action);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action.shouldVisitExpressions) {
|
if (action.shouldVisitExpressions) {
|
||||||
switch (action.visit(this)) {
|
switch (action.visit(this)) {
|
||||||
case ASTVisitor.PROCESS_ABORT: return false;
|
case ASTVisitor.PROCESS_ABORT: return false;
|
||||||
|
@ -230,13 +230,13 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
|
||||||
if (op2 != null && !op2.accept(action))
|
if (op2 != null && !op2.accept(action))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action.shouldVisitExpressions && action.leave(expr) == ASTVisitor.PROCESS_ABORT)
|
if (action.shouldVisitExpressions && action.leave(expr) == ASTVisitor.PROCESS_ABORT)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
stack= stack.fNext;
|
stack= stack.fNext;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,22 +262,22 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
|
||||||
return ((EvalBinary) eval).getOverload(this);
|
return ((EvalBinary) eval).getOverload(this);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ICPPEvaluation getEvaluation() {
|
public ICPPEvaluation getEvaluation() {
|
||||||
if (evaluation == null)
|
if (evaluation == null)
|
||||||
evaluation= computeEvaluation();
|
evaluation= computeEvaluation();
|
||||||
|
|
||||||
return evaluation;
|
return evaluation;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ICPPEvaluation computeEvaluation() {
|
private ICPPEvaluation computeEvaluation() {
|
||||||
if (operand1 == null || operand2 == null)
|
if (operand1 == null || operand2 == null)
|
||||||
return EvalFixed.INCOMPLETE;
|
return EvalFixed.INCOMPLETE;
|
||||||
|
|
||||||
return new EvalBinary(op, operand1.getEvaluation(), operand2.getEvaluation());
|
return new EvalBinary(op, operand1.getEvaluation(), operand2.getEvaluation());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IType getExpressionType() {
|
public IType getExpressionType() {
|
||||||
return getEvaluation().getTypeOrFunctionSet(this);
|
return getEvaluation().getTypeOrFunctionSet(this);
|
||||||
|
|
Loading…
Add table
Reference in a new issue