mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
ae5c304eec
commit
f9baa85a8b
4 changed files with 32 additions and 35 deletions
|
@ -51,8 +51,8 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI
|
||||||
}
|
}
|
||||||
|
|
||||||
public CPPASTTemplateId copy(CopyStyle style) {
|
public CPPASTTemplateId copy(CopyStyle style) {
|
||||||
CPPASTTemplateId copy = new CPPASTTemplateId(templateName == null ? null
|
CPPASTTemplateId copy = new CPPASTTemplateId(templateName == null ?
|
||||||
: templateName.copy(style));
|
null : templateName.copy(style));
|
||||||
for (IASTNode arg : getTemplateArguments())
|
for (IASTNode arg : getTemplateArguments())
|
||||||
copy.internalAddTemplateArgument(arg == null ? null : arg.copy(style));
|
copy.internalAddTemplateArgument(arg == null ? null : arg.copy(style));
|
||||||
copy.setOffsetAndLength(this);
|
copy.setOffsetAndLength(this);
|
||||||
|
@ -157,7 +157,7 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI
|
||||||
@Override
|
@Override
|
||||||
public boolean accept(ASTVisitor action) {
|
public boolean accept(ASTVisitor action) {
|
||||||
if (action.shouldVisitNames) {
|
if (action.shouldVisitNames) {
|
||||||
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;
|
||||||
|
@ -170,7 +170,7 @@ public class CPPASTTemplateId extends CPPASTNameBase implements ICPPASTTemplateI
|
||||||
if (!nodes[i].accept(action)) return false;
|
if (!nodes[i].accept(action)) return false;
|
||||||
}
|
}
|
||||||
if (action.shouldVisitNames) {
|
if (action.shouldVisitNames) {
|
||||||
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;
|
||||||
|
|
|
@ -21,7 +21,6 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
|
||||||
* Type id for c++
|
* Type id for c++
|
||||||
*/
|
*/
|
||||||
public class CPPASTTypeId extends ASTNode implements ICPPASTTypeId {
|
public class CPPASTTypeId extends ASTNode implements ICPPASTTypeId {
|
||||||
|
|
||||||
private IASTDeclSpecifier declSpec;
|
private IASTDeclSpecifier declSpec;
|
||||||
private IASTDeclarator absDecl;
|
private IASTDeclarator absDecl;
|
||||||
private boolean isPackExpansion;
|
private boolean isPackExpansion;
|
||||||
|
@ -87,23 +86,23 @@ public class CPPASTTypeId extends ASTNode implements ICPPASTTypeId {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean accept( ASTVisitor action ){
|
public boolean accept(ASTVisitor action) {
|
||||||
if( action.shouldVisitTypeIds ){
|
if (action.shouldVisitTypeIds) {
|
||||||
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( declSpec != null ) if( !declSpec.accept( action ) ) return false;
|
if (declSpec != null && !declSpec.accept(action)) return false;
|
||||||
if( absDecl != null ) if( !absDecl.accept( action ) ) return false;
|
if (absDecl != null && !absDecl.accept(action)) return false;
|
||||||
|
|
||||||
if( action.shouldVisitTypeIds ){
|
if (action.shouldVisitTypeIds) {
|
||||||
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;
|
||||||
|
|
|
@ -22,7 +22,6 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
|
||||||
|
|
||||||
public class CPPASTTypeIdExpression extends ASTNode implements ICPPASTTypeIdExpression {
|
public class CPPASTTypeIdExpression extends ASTNode implements ICPPASTTypeIdExpression {
|
||||||
|
|
||||||
private int op;
|
private int op;
|
||||||
private IASTTypeId typeId;
|
private IASTTypeId typeId;
|
||||||
|
|
||||||
|
@ -71,22 +70,22 @@ public class CPPASTTypeIdExpression extends ASTNode implements ICPPASTTypeIdExpr
|
||||||
}
|
}
|
||||||
|
|
||||||
@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;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -104,7 +103,7 @@ public class CPPASTTypeIdExpression extends ASTNode implements ICPPASTTypeIdExpr
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isLValue() {
|
public boolean isLValue() {
|
||||||
switch(getOperator()) {
|
switch (getOperator()) {
|
||||||
case op_typeid:
|
case op_typeid:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,6 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
* Base class for specializations and instances of other bindings.
|
* Base class for specializations and instances of other bindings.
|
||||||
*/
|
*/
|
||||||
abstract class PDOMCPPSpecialization extends PDOMCPPBinding implements ICPPSpecialization, IPDOMOverloader {
|
abstract class PDOMCPPSpecialization extends PDOMCPPBinding implements ICPPSpecialization, IPDOMOverloader {
|
||||||
|
|
||||||
private static final int ARGMAP = PDOMCPPBinding.RECORD_SIZE + 0;
|
private static final int ARGMAP = PDOMCPPBinding.RECORD_SIZE + 0;
|
||||||
private static final int SIGNATURE_HASH = PDOMCPPBinding.RECORD_SIZE + 4;
|
private static final int SIGNATURE_HASH = PDOMCPPBinding.RECORD_SIZE + 4;
|
||||||
private static final int SPECIALIZED = PDOMCPPBinding.RECORD_SIZE + 8;
|
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 IBinding fSpecializedCache= null;
|
||||||
private ICPPTemplateParameterMap fArgMap;
|
private ICPPTemplateParameterMap fArgMap;
|
||||||
|
|
||||||
public PDOMCPPSpecialization(PDOMLinkage linkage, PDOMNode parent, ICPPSpecialization spec, IPDOMBinding specialized)
|
public PDOMCPPSpecialization(PDOMLinkage linkage, PDOMNode parent, ICPPSpecialization spec,
|
||||||
throws CoreException {
|
IPDOMBinding specialized) throws CoreException {
|
||||||
super(linkage, parent, spec.getNameCharArray());
|
super(linkage, parent, spec.getNameCharArray());
|
||||||
getDB().putRecPtr(record + SPECIALIZED, specialized.getRecord());
|
getDB().putRecPtr(record + SPECIALIZED, specialized.getRecord());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue