mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
toString method.
This commit is contained in:
parent
e22010288b
commit
4554f2baf8
1 changed files with 20 additions and 16 deletions
|
@ -34,7 +34,6 @@ public class CPPASTIdExpression extends ASTNode implements IASTIdExpression, IAS
|
|||
|
||||
private IASTName name;
|
||||
|
||||
|
||||
public CPPASTIdExpression() {
|
||||
}
|
||||
|
||||
|
@ -62,21 +61,21 @@ public class CPPASTIdExpression extends ASTNode implements IASTIdExpression, IAS
|
|||
}
|
||||
|
||||
@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;
|
||||
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( name != null ) if( !name.accept( action ) ) return false;
|
||||
if (name != null && !name.accept(action)) return false;
|
||||
|
||||
if( action.shouldVisitExpressions ){
|
||||
switch( action.leave( this ) ){
|
||||
case ASTVisitor.PROCESS_ABORT : return false;
|
||||
case ASTVisitor.PROCESS_SKIP : return true;
|
||||
if (action.shouldVisitExpressions) {
|
||||
switch (action.leave(this)) {
|
||||
case ASTVisitor.PROCESS_ABORT: return false;
|
||||
case ASTVisitor.PROCESS_SKIP: return true;
|
||||
default : break;
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +83,7 @@ public class CPPASTIdExpression extends ASTNode implements IASTIdExpression, IAS
|
|||
}
|
||||
|
||||
public int getRoleForName(IASTName n) {
|
||||
if( name == n )return r_reference;
|
||||
if (name == n) return r_reference;
|
||||
return r_unclear;
|
||||
}
|
||||
|
||||
|
@ -115,4 +114,9 @@ public class CPPASTIdExpression extends ASTNode implements IASTIdExpression, IAS
|
|||
public IBinding[] findBindings(IASTName n, boolean isPrefix) {
|
||||
return CPPSemantics.findBindingsForContentAssist(n, isPrefix);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name != null ? name.toString() : "<unnamed>"; //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue