1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-03-31 07:02:11 +00:00
parent ae5c304eec
commit f9baa85a8b
4 changed files with 32 additions and 35 deletions

View file

@ -51,8 +51,8 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI
}
public CPPASTTemplateId copy(CopyStyle style) {
CPPASTTemplateId copy = new CPPASTTemplateId(templateName == null ? null
: templateName.copy(style));
CPPASTTemplateId copy = new CPPASTTemplateId(templateName == null ?
null : templateName.copy(style));
for (IASTNode arg : getTemplateArguments())
copy.internalAddTemplateArgument(arg == null ? null : arg.copy(style));
copy.setOffsetAndLength(this);
@ -157,7 +157,7 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI
@Override
public boolean accept(ASTVisitor action) {
if (action.shouldVisitNames) {
switch(action.visit(this)) {
switch (action.visit(this)) {
case ASTVisitor.PROCESS_ABORT: return false;
case ASTVisitor.PROCESS_SKIP: return true;
default: break;
@ -170,7 +170,7 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI
if (!nodes[i].accept(action)) return false;
}
if (action.shouldVisitNames) {
switch(action.leave(this)) {
switch (action.leave(this)) {
case ASTVisitor.PROCESS_ABORT: return false;
case ASTVisitor.PROCESS_SKIP: return true;
default: break;

View file

@ -21,7 +21,6 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
* Type id for c++
*/
public class CPPASTTypeId extends ASTNode implements ICPPASTTypeId {
private IASTDeclSpecifier declSpec;
private IASTDeclarator absDecl;
private boolean isPackExpansion;
@ -87,23 +86,23 @@ public class CPPASTTypeId extends ASTNode implements ICPPASTTypeId {
}
@Override
public boolean accept( ASTVisitor action ){
if( action.shouldVisitTypeIds ){
switch( action.visit( this ) ){
case ASTVisitor.PROCESS_ABORT : return false;
case ASTVisitor.PROCESS_SKIP : return true;
default : break;
public boolean accept(ASTVisitor action) {
if (action.shouldVisitTypeIds) {
switch (action.visit(this)) {
case ASTVisitor.PROCESS_ABORT: return false;
case ASTVisitor.PROCESS_SKIP: return true;
default: break;
}
}
if( declSpec != null ) if( !declSpec.accept( action ) ) return false;
if( absDecl != null ) if( !absDecl.accept( action ) ) return false;
if (declSpec != null && !declSpec.accept(action)) return false;
if (absDecl != null && !absDecl.accept(action)) return false;
if( action.shouldVisitTypeIds ){
switch( action.leave( this ) ){
case ASTVisitor.PROCESS_ABORT : return false;
case ASTVisitor.PROCESS_SKIP : return true;
default : break;
if (action.shouldVisitTypeIds) {
switch (action.leave(this)) {
case ASTVisitor.PROCESS_ABORT: return false;
case ASTVisitor.PROCESS_SKIP: return true;
default: break;
}
}
return true;

View file

@ -22,7 +22,6 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
public class CPPASTTypeIdExpression extends ASTNode implements ICPPASTTypeIdExpression {
private int op;
private IASTTypeId typeId;
@ -71,22 +70,22 @@ public class CPPASTTypeIdExpression extends ASTNode implements ICPPASTTypeIdExpr
}
@Override
public boolean accept( ASTVisitor action ){
if( action.shouldVisitExpressions ){
switch( action.visit( this ) ){
case ASTVisitor.PROCESS_ABORT : return false;
case ASTVisitor.PROCESS_SKIP : return true;
default : break;
public boolean accept(ASTVisitor action) {
if (action.shouldVisitExpressions) {
switch (action.visit(this)) {
case ASTVisitor.PROCESS_ABORT: return false;
case ASTVisitor.PROCESS_SKIP: return true;
default: break;
}
}
if( typeId != null ) if( !typeId.accept( action ) ) return false;
if (typeId != null && !typeId.accept(action)) return false;
if( action.shouldVisitExpressions ){
switch( action.leave( this ) ){
case ASTVisitor.PROCESS_ABORT : return false;
case ASTVisitor.PROCESS_SKIP : return true;
default : break;
if (action.shouldVisitExpressions) {
switch (action.leave(this)) {
case ASTVisitor.PROCESS_ABORT: return false;
case ASTVisitor.PROCESS_SKIP: return true;
default: break;
}
}
return true;
@ -104,7 +103,7 @@ public class CPPASTTypeIdExpression extends ASTNode implements ICPPASTTypeIdExpr
}
public boolean isLValue() {
switch(getOperator()) {
switch (getOperator()) {
case op_typeid:
return true;
}

View file

@ -31,7 +31,6 @@ import org.eclipse.core.runtime.CoreException;
* Base class for specializations and instances of other bindings.
*/
abstract class PDOMCPPSpecialization extends PDOMCPPBinding implements ICPPSpecialization, IPDOMOverloader {
private static final int ARGMAP = PDOMCPPBinding.RECORD_SIZE + 0;
private static final int SIGNATURE_HASH = PDOMCPPBinding.RECORD_SIZE + 4;
private static final int SPECIALIZED = PDOMCPPBinding.RECORD_SIZE + 8;
@ -44,8 +43,8 @@ abstract class PDOMCPPSpecialization extends PDOMCPPBinding implements ICPPSpeci
private IBinding fSpecializedCache= null;
private ICPPTemplateParameterMap fArgMap;
public PDOMCPPSpecialization(PDOMLinkage linkage, PDOMNode parent, ICPPSpecialization spec, IPDOMBinding specialized)
throws CoreException {
public PDOMCPPSpecialization(PDOMLinkage linkage, PDOMNode parent, ICPPSpecialization spec,
IPDOMBinding specialized) throws CoreException {
super(linkage, parent, spec.getNameCharArray());
getDB().putRecPtr(record + SPECIALIZED, specialized.getRecord());