mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Fix for 198259 by Emanuel Graf, wrong order of accept- and leave calls.
This commit is contained in:
parent
a780b749bb
commit
1561bd668d
1 changed files with 26 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005 IBM Corporation and others.
|
||||
* Copyright (c) 2005, 2007 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* IBM - Initial API and implementation
|
||||
* Emanuel Graf IFS - Bugfix for #198259
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||
|
||||
|
@ -39,9 +40,29 @@ public class CPPASTConversionName extends CPPASTName implements ICPPASTConversio
|
|||
}
|
||||
|
||||
public boolean accept(ASTVisitor action) {
|
||||
boolean why = super.accept(action);
|
||||
if( why && typeId != null )
|
||||
return typeId.accept( action );
|
||||
return why;
|
||||
if (action.shouldVisitNames) {
|
||||
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 (action.shouldVisitNames) {
|
||||
switch (action.leave(this)) {
|
||||
case ASTVisitor.PROCESS_ABORT:
|
||||
return false;
|
||||
case ASTVisitor.PROCESS_SKIP:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue