mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 20:05:35 +02:00
Cosmetics.
This commit is contained in:
parent
bb61124897
commit
2f36117b61
2 changed files with 17 additions and 18 deletions
|
@ -6,9 +6,9 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||||
* Markus Schorn (Wind River Systems)
|
* Markus Schorn (Wind River Systems)
|
||||||
* Yuan Zhang / Beth Tibbitts (IBM Research)
|
* Yuan Zhang / Beth Tibbitts (IBM Research)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.dom.parser.c;
|
package org.eclipse.cdt.internal.core.dom.parser.c;
|
||||||
|
|
||||||
|
@ -27,9 +27,8 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
|
||||||
* e.g.: int a[]= {1,2,3};
|
* e.g.: int a[]= {1,2,3};
|
||||||
*/
|
*/
|
||||||
public class CASTInitializerList extends ASTNode implements IASTInitializerList, IASTAmbiguityParent {
|
public class CASTInitializerList extends ASTNode implements IASTInitializerList, IASTAmbiguityParent {
|
||||||
|
private IASTInitializerClause[] initializers;
|
||||||
private IASTInitializerClause[] initializers = null;
|
private int initializersPos = -1;
|
||||||
private int initializersPos=-1;
|
|
||||||
private int actualSize;
|
private int actualSize;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -86,7 +85,7 @@ public class CASTInitializerList extends ASTNode implements IASTInitializerList,
|
||||||
public void addClause(IASTInitializerClause d) {
|
public void addClause(IASTInitializerClause d) {
|
||||||
assertNotFrozen();
|
assertNotFrozen();
|
||||||
if (d != null) {
|
if (d != null) {
|
||||||
initializers = ArrayUtil.appendAt( IASTInitializerClause.class, initializers, ++initializersPos, d );
|
initializers = ArrayUtil.appendAt(IASTInitializerClause.class, initializers, ++initializersPos, d);
|
||||||
d.setParent(this);
|
d.setParent(this);
|
||||||
d.setPropertyInParent(NESTED_INITIALIZER);
|
d.setPropertyInParent(NESTED_INITIALIZER);
|
||||||
}
|
}
|
||||||
|
@ -107,11 +106,11 @@ public class CASTInitializerList extends ASTNode implements IASTInitializerList,
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean accept( ASTVisitor action ){
|
public boolean accept(ASTVisitor action) {
|
||||||
if( action.shouldVisitInitializers ){
|
if (action.shouldVisitInitializers) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,11 +119,11 @@ public class CASTInitializerList extends ASTNode implements IASTInitializerList,
|
||||||
if (!clause.accept(action))
|
if (!clause.accept(action))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if( action.shouldVisitInitializers ){
|
if (action.shouldVisitInitializers) {
|
||||||
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;
|
||||||
|
|
|
@ -29,7 +29,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalInitList;
|
||||||
*/
|
*/
|
||||||
public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializerList, IASTAmbiguityParent {
|
public class CPPASTInitializerList extends ASTNode implements ICPPASTInitializerList, IASTAmbiguityParent {
|
||||||
private static final ICPPASTInitializerClause[] NO_CLAUSES = {};
|
private static final ICPPASTInitializerClause[] NO_CLAUSES = {};
|
||||||
private ICPPASTInitializerClause [] initializers;
|
private ICPPASTInitializerClause[] initializers;
|
||||||
private int initializersPos= -1;
|
private int initializersPos= -1;
|
||||||
private int actualSize;
|
private int actualSize;
|
||||||
private boolean fIsPackExpansion;
|
private boolean fIsPackExpansion;
|
||||||
|
|
Loading…
Add table
Reference in a new issue