mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Code formatting.
This commit is contained in:
parent
244d06f38a
commit
973c77a635
1 changed files with 20 additions and 21 deletions
|
@ -28,7 +28,6 @@ public class CPPASTElaboratedTypeSpecifier extends CPPASTBaseDeclSpecifier
|
||||||
|
|
||||||
private int kind;
|
private int kind;
|
||||||
private IASTName name;
|
private IASTName name;
|
||||||
|
|
||||||
|
|
||||||
public CPPASTElaboratedTypeSpecifier() {
|
public CPPASTElaboratedTypeSpecifier() {
|
||||||
}
|
}
|
||||||
|
@ -59,43 +58,43 @@ public class CPPASTElaboratedTypeSpecifier extends CPPASTBaseDeclSpecifier
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean accept( ASTVisitor action ){
|
public boolean accept(ASTVisitor action) {
|
||||||
if( action.shouldVisitDeclSpecifiers ){
|
if (action.shouldVisitDeclSpecifiers) {
|
||||||
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( name != null ) if( !name.accept( action ) ) return false;
|
if (name != null) if (!name.accept(action)) return false;
|
||||||
if( action.shouldVisitDeclSpecifiers ){
|
if (action.shouldVisitDeclSpecifiers) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRoleForName(IASTName n) {
|
public int getRoleForName(IASTName n) {
|
||||||
if( n != name ) return r_unclear;
|
if (n != name) return r_unclear;
|
||||||
|
|
||||||
IASTNode parent = getParent();
|
IASTNode parent = getParent();
|
||||||
if( !( parent instanceof IASTDeclaration ) )
|
if (!(parent instanceof IASTDeclaration))
|
||||||
return r_reference;
|
return r_reference;
|
||||||
|
|
||||||
if( parent instanceof IASTSimpleDeclaration ){
|
if (parent instanceof IASTSimpleDeclaration) {
|
||||||
IASTDeclarator [] dtors = ((IASTSimpleDeclaration)parent).getDeclarators();
|
IASTDeclarator[] dtors = ((IASTSimpleDeclaration)parent).getDeclarators();
|
||||||
if( dtors.length == 0 )
|
if (dtors.length == 0)
|
||||||
return r_declaration;
|
return r_declaration;
|
||||||
}
|
}
|
||||||
|
|
||||||
//can't tell, resolve the binding
|
//can't tell, resolve the binding
|
||||||
IBinding binding = name.resolveBinding();
|
IBinding binding = name.resolveBinding();
|
||||||
if( binding instanceof ICPPInternalBinding ){
|
if (binding instanceof ICPPInternalBinding) {
|
||||||
IASTNode [] decls = ((ICPPInternalBinding)binding).getDeclarations();
|
IASTNode[] decls = ((ICPPInternalBinding)binding).getDeclarations();
|
||||||
if( ArrayUtil.contains( decls, name ) )
|
if (ArrayUtil.contains(decls, name))
|
||||||
return r_declaration;
|
return r_declaration;
|
||||||
}
|
}
|
||||||
return r_reference;
|
return r_reference;
|
||||||
|
|
Loading…
Add table
Reference in a new issue