mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
a38e6e30f5
commit
eaabdd84c8
2 changed files with 17 additions and 20 deletions
|
@ -180,7 +180,7 @@ public class CPPASTBinaryExpression extends ASTNode implements ICPPASTBinaryExpr
|
||||||
if (stack.fState == 0) {
|
if (stack.fState == 0) {
|
||||||
if (action.shouldVisitExpressions) {
|
if (action.shouldVisitExpressions) {
|
||||||
switch (action.visit(expr)) {
|
switch (action.visit(expr)) {
|
||||||
case ASTVisitor.PROCESS_ABORT :
|
case ASTVisitor.PROCESS_ABORT:
|
||||||
return false;
|
return false;
|
||||||
case ASTVisitor.PROCESS_SKIP:
|
case ASTVisitor.PROCESS_SKIP:
|
||||||
stack= stack.fNext;
|
stack= stack.fNext;
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* John Camelon (IBM) - Initial API and implementation
|
* John Camelon (IBM) - Initial API and implementation
|
||||||
* Markus Schorn (Wind River Systems)
|
* Markus Schorn (Wind River Systems)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cast expression for c++
|
* Cast expression for C++
|
||||||
*/
|
*/
|
||||||
public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpression, IASTAmbiguityParent {
|
public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpression, IASTAmbiguityParent {
|
||||||
private int op;
|
private int op;
|
||||||
|
@ -54,7 +54,6 @@ public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpressi
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setTypeId(IASTTypeId typeId) {
|
public void setTypeId(IASTTypeId typeId) {
|
||||||
assertNotFrozen();
|
assertNotFrozen();
|
||||||
this.typeId = typeId;
|
this.typeId = typeId;
|
||||||
|
@ -91,24 +90,24 @@ public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpressi
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean accept( ASTVisitor action ){
|
public boolean accept(ASTVisitor 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;
|
||||||
case ASTVisitor.PROCESS_SKIP : return true;
|
case ASTVisitor.PROCESS_SKIP: return true;
|
||||||
default : break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( typeId != null ) if( !typeId.accept( action ) ) return false;
|
if (typeId != null && !typeId.accept(action)) return false;
|
||||||
IASTExpression op = getOperand();
|
IASTExpression op = getOperand();
|
||||||
if( op != null ) if( !op.accept( action ) ) return false;
|
if (op != null && !op.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;
|
||||||
case ASTVisitor.PROCESS_SKIP : return true;
|
case ASTVisitor.PROCESS_SKIP: return true;
|
||||||
default : break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -141,6 +140,4 @@ public class CPPASTCastExpression extends ASTNode implements ICPPASTCastExpressi
|
||||||
public boolean isLValue() {
|
public boolean isLValue() {
|
||||||
return getValueCategory() == LVALUE;
|
return getValueCategory() == LVALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue