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

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-10-23 21:50:39 -07:00
parent e65e1eabc1
commit b7de8668c6
2 changed files with 21 additions and 24 deletions

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Rational Software - Initial API and implementation
* Yuan Zhang / Beth Tibbitts (IBM Research)
* IBM Rational Software - Initial API and implementation
* Yuan Zhang / Beth Tibbitts (IBM Research)
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.c;
@ -21,7 +21,6 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
* @author jcamelon
*/
public class CASTTypeId extends ASTNode implements IASTTypeId {
private IASTDeclSpecifier declSpecifier;
private IASTDeclarator declarator;
@ -72,27 +71,26 @@ public class CASTTypeId extends ASTNode implements IASTTypeId {
abstractDeclarator.setParent(this);
abstractDeclarator.setPropertyInParent(ABSTRACT_DECLARATOR);
}
}
@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( declSpecifier != null ) if( !declSpecifier.accept( action ) ) return false;
if( declarator != null ) if( !declarator.accept( action ) ) return false;
if (declSpecifier != null && !declSpecifier.accept(action)) return false;
if (declarator != null && !declarator.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

@ -6,10 +6,10 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM - Initial API and implementation
* Bryan Wilkinson (QNX)
* Markus Schorn (Wind River Systems)
* Sergey Prigogin (Google)
* IBM - Initial API and implementation
* Bryan Wilkinson (QNX)
* Markus Schorn (Wind River Systems)
* Sergey Prigogin (Google)
*******************************************************************************/
package org.eclipse.cdt.internal.core.dom.parser.cpp.semantics;
@ -155,7 +155,7 @@ public class CPPTemplates {
private static final int PACK_SIZE_FAIL = -2;
private static final int PACK_SIZE_NOT_FOUND = Integer.MAX_VALUE;
private static final ICPPFunction[] NO_FUNCTIONS = {};
static enum TypeSelection {PARAMETERS, RETURN_TYPE, PARAMETERS_AND_RETURN_TYPE}
static enum TypeSelection { PARAMETERS, RETURN_TYPE, PARAMETERS_AND_RETURN_TYPE }
/**
* Instantiates a class template with the given arguments. May return <code>null</code>.
@ -183,8 +183,7 @@ public class CPPTemplates {
if (template instanceof ICPPClassTemplatePartialSpecialization) {
return instantiatePartialSpecialization((ICPPClassTemplatePartialSpecialization) template, arguments, isDefinition, null);
}
final ICPPTemplateParameter[] parameters= template.getTemplateParameters();
final int numArgs = arguments.length;
final int numParams= parameters.length;