1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
Renamed IToken::tELIPSE to IToken::tELLIPSIS
	Partially fixed Bug 43110 : Parser support needed for functions with ellipses 

TESTS
	Added CompleteParseASTTest::testBug43110() and QuickParseASTTests::testBug43110().
This commit is contained in:
John Camelon 2004-01-06 15:26:48 +00:00
parent 0ec807acad
commit d02df84a93
18 changed files with 95 additions and 33 deletions

View file

@ -1,3 +1,6 @@
2004-01-06 John Camelon
Added CompleteParseASTTest::testBug43110() and QuickParseASTTests::testBug43110().
2003-12-31 Hoda Amer 2003-12-31 Hoda Amer
Small change to test parameters with initial clause in ITemplateTest Small change to test parameters with initial clause in ITemplateTest

View file

@ -1102,4 +1102,15 @@ public class CompleteParseASTTest extends CompleteParseBaseTest
assertAllReferences( 5, createTaskList( new Task( namespace, 2 ), new Task( classA, 2 ), new Task( a ) ) ); assertAllReferences( 5, createTaskList( new Task( namespace, 2 ), new Task( classA, 2 ), new Task( a ) ) );
} }
public void testBug43110() throws Exception
{
StringBuffer buffer = new StringBuffer();
buffer.append("void x( int y, ... );\n");
buffer.append("void y( int x... );\n");
buffer.append("void z(...);");
Iterator i = parse(buffer.toString() ).getDeclarations();
while( i.hasNext() )
assertTrue( ((IASTFunction)i.next()).takesVarArgs() );
}
} }

View file

@ -2022,4 +2022,12 @@ public class QuickParseASTTests extends BaseASTTest
assertEquals( exp.getLiteralString(), "ab"); assertEquals( exp.getLiteralString(), "ab");
} }
public void testBug43110() throws Exception
{
IASTFunction function = (IASTFunction) assertSoleDeclaration( "void x( int y, ... );");
assertTrue( function.takesVarArgs() );
function = (IASTFunction) assertSoleDeclaration( "void x( int y... );");
assertTrue( function.takesVarArgs() );
}
} }

View file

@ -190,7 +190,7 @@ public class ScannerTestCase extends BaseScannerTest
validateFloatingPointLiteral( "3."); validateFloatingPointLiteral( "3.");
validateFloatingPointLiteral( "4E5"); validateFloatingPointLiteral( "4E5");
validateFloatingPointLiteral( "2.01E-03" ); validateFloatingPointLiteral( "2.01E-03" );
validateToken( IToken.tELIPSE ); validateToken( IToken.tELLIPSIS );
validateEOF(); validateEOF();
} }
catch( ScannerException se ) catch( ScannerException se )
@ -1033,7 +1033,7 @@ public class ScannerTestCase extends BaseScannerTest
initializeScanner( "foo...bar"); initializeScanner( "foo...bar");
validateIdentifier("foo"); validateIdentifier("foo");
validateToken( IToken.tELIPSE ); validateToken( IToken.tELLIPSIS );
validateIdentifier("bar"); validateIdentifier("bar");
validateEOF(); validateEOF();
} }

View file

@ -1,3 +1,7 @@
2004-01-06 John Camelon
Renamed IToken::tELIPSE to IToken::tELLIPSIS
Partially fixed Bug 43110 : Parser support needed for functions with ellipses
2004-01-05 John Camelon 2004-01-05 John Camelon
Removed warnings. Removed warnings.
Moved StructuralParseCallback from model to parser directory to facilitate building the parser standalone. Moved StructuralParseCallback from model to parser directory to facilitate building the parser standalone.

View file

@ -123,7 +123,7 @@ public interface IToken {
static public final int tSHIFTLASSIGN = 47; static public final int tSHIFTLASSIGN = 47;
static public final int tELIPSE = 48; static public final int tELLIPSIS = 48;
static public final int tDOTSTAR = 49; static public final int tDOTSTAR = 49;

View file

@ -26,7 +26,7 @@ public interface IASTFactory
String name, String name,
int startingOffset, int startingOffset,
int nameOffset, int nameOffset,
int nameEndOffset, int endingOffset) ; int nameEndOffset, int endingOffset);
public IASTInclusion createInclusion( public IASTInclusion createInclusion(
String name, String name,
@ -131,7 +131,7 @@ public interface IASTFactory
/** /**
* @param exp * @param exp
*/ */
public IASTArrayModifier createArrayModifier(IASTExpression exp) ; public IASTArrayModifier createArrayModifier(IASTExpression exp);
/** /**
* @param duple * @param duple
@ -169,7 +169,7 @@ public interface IASTFactory
boolean isVolatile, boolean isVolatile,
boolean isVirtual, boolean isVirtual,
boolean isExplicit, boolean isExplicit,
boolean isPureVirtual, List constructorChain, boolean isDefinition, boolean hasFunctionTryBlock ) throws ASTSemanticException; boolean isPureVirtual, List constructorChain, boolean isDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments ) throws ASTSemanticException;
public IASTAbstractDeclaration createAbstractDeclaration( public IASTAbstractDeclaration createAbstractDeclaration(
@ -195,7 +195,7 @@ public interface IASTFactory
boolean isVolatile, boolean isVolatile,
boolean isVirtual, boolean isVirtual,
boolean isExplicit, boolean isExplicit,
boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isDefinition, boolean hasFunctionTryBlock) throws ASTSemanticException; boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments) throws ASTSemanticException;
public IASTVariable createVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, public IASTVariable createVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression,
IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, int nameEndOffset, IASTExpression constructorExpression ) throws ASTSemanticException; IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, int nameEndOffset, IASTExpression constructorExpression ) throws ASTSemanticException;

View file

@ -22,6 +22,8 @@ public interface IASTFunction extends IASTCodeScope, IASTOffsetableNamedElement,
public boolean isFriend(); public boolean isFriend();
public boolean isStatic(); public boolean isStatic();
public boolean takesVarArgs();
public String getName(); public String getName();
public IASTAbstractDeclaration getReturnType(); public IASTAbstractDeclaration getReturnType();

View file

@ -483,7 +483,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
virtual, virtual,
explicit, explicit,
declarator.isPureVirtual(), ((IASTClassSpecifier)scope).getCurrentVisibilityMode(), declarator.isPureVirtual(), ((IASTClassSpecifier)scope).getCurrentVisibilityMode(),
declarator.getConstructorMemberInitializers(), declarator.hasFunctionBody(), declarator.hasFunctionTryBlock()); declarator.getConstructorMemberInitializers(), declarator.hasFunctionBody(), declarator.hasFunctionTryBlock(), declarator.isVarArgs());
} }
catch (ASTSemanticException e) catch (ASTSemanticException e)
{ {
@ -524,7 +524,8 @@ public class DeclarationWrapper implements IDeclaratorOwner
virtual, virtual,
explicit, explicit,
declarator.isPureVirtual(), declarator.isPureVirtual(),
declarator.getConstructorMemberInitializers(), declarator.hasFunctionBody(), declarator.hasFunctionTryBlock() ); declarator.getConstructorMemberInitializers(), declarator.hasFunctionBody(), declarator.hasFunctionTryBlock(),
declarator.isVarArgs() );
} }
catch (ASTSemanticException e) catch (ASTSemanticException e)
{ {

View file

@ -52,6 +52,7 @@ public class Declarator implements IParameterCollection, IDeclaratorOwner, IDecl
private int nameStartOffset, nameEndOffset; private int nameStartOffset, nameEndOffset;
private boolean varArgs;
public Declarator( IDeclaratorOwner owner ) public Declarator( IDeclaratorOwner owner )
{ {
@ -433,4 +434,18 @@ public class Declarator implements IParameterCollection, IDeclaratorOwner, IDecl
hasFunctionTryBlock = b; hasFunctionTryBlock = b;
} }
/**
* @param b
*/
public void setIsVarArgs(boolean b) {
varArgs = b;
}
/**
* @return Returns the varArgs.
*/
public boolean isVarArgs() {
return varArgs;
}
} }

View file

@ -2198,8 +2198,9 @@ public abstract class Parser implements IParser
case IToken.tRPAREN : case IToken.tRPAREN :
consume(); consume();
break parameterDeclarationLoop; break parameterDeclarationLoop;
case IToken.tELIPSE : case IToken.tELLIPSIS :
consume(); consume();
d.setIsVarArgs( true );
break; break;
case IToken.tCOMMA : case IToken.tCOMMA :
consume(); consume();
@ -3046,8 +3047,8 @@ public abstract class Parser implements IParser
{ {
consume(IToken.t_catch); consume(IToken.t_catch);
consume(IToken.tLPAREN); consume(IToken.tLPAREN);
if( LT(1) == IToken.tELIPSE ) if( LT(1) == IToken.tELLIPSIS )
consume( IToken.tELIPSE ); consume( IToken.tELLIPSIS );
else else
declaration(scope, null); // was exceptionDeclaration declaration(scope, null); // was exceptionDeclaration
consume(IToken.tRPAREN); consume(IToken.tRPAREN);

View file

@ -944,7 +944,7 @@ public class Scanner implements IScanner {
return newToken( IToken.tDOTSTAR, ".*", contextStack.getCurrentContext() ); return newToken( IToken.tDOTSTAR, ".*", contextStack.getCurrentContext() );
} else if( c == '.' ){ } else if( c == '.' ){
if( getChar() == '.' ) if( getChar() == '.' )
return newToken( IToken.tELIPSE, "..." ); return newToken( IToken.tELLIPSIS, "..." );
else else
handleProblem( IProblem.SCANNER_BAD_FLOATING_POINT, null, beginOffset, false, true, true ); handleProblem( IProblem.SCANNER_BAD_FLOATING_POINT, null, beginOffset, false, true, true );
} else { } else {
@ -1557,7 +1557,7 @@ public class Scanner implements IScanner {
switch (c) { switch (c) {
case '.' : case '.' :
return newToken( return newToken(
IToken.tELIPSE, IToken.tELLIPSIS,
"...", "...",
contextStack.getCurrentContext()); contextStack.getCurrentContext());
default : default :

View file

@ -55,7 +55,7 @@ public class ASTFunction extends ASTScope implements IASTFunction
* @param ownerTemplate * @param ownerTemplate
* @param references * @param references
*/ */
public ASTFunction(IParameterizedSymbol symbol, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, int startOffset, int nameOffset, IASTTemplate ownerTemplate, List references, boolean previouslyDeclared, boolean hasFunctionTryBlock ) public ASTFunction(IParameterizedSymbol symbol, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, int startOffset, int nameOffset, IASTTemplate ownerTemplate, List references, boolean previouslyDeclared, boolean hasFunctionTryBlock, boolean hasVarArgs)
{ {
super( symbol ); super( symbol );
this.parameters = parameters; this.parameters = parameters;
@ -70,6 +70,7 @@ public class ASTFunction extends ASTScope implements IASTFunction
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() ); qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
this.previouslyDeclared =previouslyDeclared; this.previouslyDeclared =previouslyDeclared;
this.hasFunctionTryBlock = hasFunctionTryBlock; this.hasFunctionTryBlock = hasFunctionTryBlock;
this.varArgs = hasVarArgs;
} }
@ -305,6 +306,7 @@ public class ASTFunction extends ASTScope implements IASTFunction
private boolean hasFunctionTryBlock = false; private boolean hasFunctionTryBlock = false;
private final boolean varArgs;
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.parser.ast.IASTFunction#setHasFunctionTryBlock(boolean) * @see org.eclipse.cdt.core.parser.ast.IASTFunction#setHasFunctionTryBlock(boolean)
*/ */
@ -330,4 +332,11 @@ public class ASTFunction extends ASTScope implements IASTFunction
declarations.add(declaration); declarations.add(declaration);
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.parser.ast.IASTFunction#takesVarArgs()
*/
public boolean takesVarArgs() {
return varArgs;
}
} }

View file

@ -46,7 +46,7 @@ public class ASTMethod extends ASTFunction implements IASTMethod
* @param references * @param references
*/ */
public ASTMethod(IParameterizedSymbol symbol, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, int startOffset, int nameOffset, IASTTemplate ownerTemplate, List references, boolean previouslyDeclared, public ASTMethod(IParameterizedSymbol symbol, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, int startOffset, int nameOffset, IASTTemplate ownerTemplate, List references, boolean previouslyDeclared,
boolean isConstructor, boolean isDestructor, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean hasFunctionTryBlock ) boolean isConstructor, boolean isDestructor, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean hasFunctionTryBlock, boolean hasVariableArguments )
{ {
super( super(
symbol, symbol,
@ -57,7 +57,7 @@ public class ASTMethod extends ASTFunction implements IASTMethod
startOffset, startOffset,
nameOffset, nameOffset,
ownerTemplate, ownerTemplate,
references, previouslyDeclared, hasFunctionTryBlock ); references, previouslyDeclared, hasFunctionTryBlock, hasVariableArguments );
this.visibility = visibility; this.visibility = visibility;
this.isConstructor = isConstructor; this.isConstructor = isConstructor;
this.isDestructor = isDestructor; this.isDestructor = isDestructor;

View file

@ -1596,7 +1596,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
boolean isExplicit, boolean isExplicit,
boolean isPureVirtual, boolean isPureVirtual,
List constructorChain, List constructorChain,
boolean isFunctionDefinition, boolean hasFunctionTryBlock ) throws ASTSemanticException boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments ) throws ASTSemanticException
{ {
List references = new ArrayList(); List references = new ArrayList();
IContainerSymbol ownerScope = scopeToSymbol( scope ); IContainerSymbol ownerScope = scopeToSymbol( scope );
@ -1641,7 +1641,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
ASTAccessVisibility.PRIVATE, ASTAccessVisibility.PRIVATE,
constructorChain, constructorChain,
references, references,
isFunctionDefinition, hasFunctionTryBlock ); isFunctionDefinition, hasFunctionTryBlock, hasVariableArguments );
} }
} }
@ -1684,7 +1684,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
{ {
throw new ASTSemanticException(); throw new ASTSemanticException();
} }
ASTFunction function = new ASTFunction( symbol, nameEndOffset, parameters, returnType, exception, startOffset, nameOffset, ownerTemplate, references, previouslyDeclared, hasFunctionTryBlock ); ASTFunction function = new ASTFunction( symbol, nameEndOffset, parameters, returnType, exception, startOffset, nameOffset, ownerTemplate, references, previouslyDeclared, hasFunctionTryBlock, hasVariableArguments );
try try
{ {
attachSymbolExtension(symbol, function); attachSymbolExtension(symbol, function);
@ -1892,12 +1892,12 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
boolean isVirtual, boolean isVirtual,
boolean isExplicit, boolean isExplicit,
boolean isPureVirtual, boolean isPureVirtual,
ASTAccessVisibility visibility, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock ) throws ASTSemanticException ASTAccessVisibility visibility, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments ) throws ASTSemanticException
{ {
return createMethod(scope, name, parameters, returnType, exception, return createMethod(scope, name, parameters, returnType, exception,
isInline, isFriend, isStatic, startOffset, nameOffset, nameEndOffset, isInline, isFriend, isStatic, startOffset, nameOffset, nameEndOffset,
ownerTemplate, isConst, isVolatile, isVirtual, isExplicit, isPureVirtual, ownerTemplate, isConst, isVolatile, isVirtual, isExplicit, isPureVirtual,
visibility, constructorChain, null, isFunctionDefinition, hasFunctionTryBlock ); visibility, constructorChain, null, isFunctionDefinition, hasFunctionTryBlock, hasVariableArguments );
} }
public IASTMethod createMethod( public IASTMethod createMethod(
@ -1920,7 +1920,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
boolean isPureVirtual, boolean isPureVirtual,
ASTAccessVisibility visibility, ASTAccessVisibility visibility,
List constructorChain, List constructorChain,
List references, boolean isFunctionDefinition, boolean hasFunctionTryBlock ) throws ASTSemanticException List references, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments ) throws ASTSemanticException
{ {
boolean isConstructor = false; boolean isConstructor = false;
boolean isDestructor = false; boolean isDestructor = false;
@ -1997,7 +1997,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
resolveLeftoverConstructorInitializerMembers( symbol, constructorChain ); resolveLeftoverConstructorInitializerMembers( symbol, constructorChain );
ASTMethod method = new ASTMethod( symbol, nameEndOffset, parameters, returnType, exception, startOffset, nameOffset, ownerTemplate, references, previouslyDeclared, isConstructor, isDestructor, isPureVirtual, visibility, constructorChain, hasFunctionTryBlock ); ASTMethod method = new ASTMethod( symbol, nameEndOffset, parameters, returnType, exception, startOffset, nameOffset, ownerTemplate, references, previouslyDeclared, isConstructor, isDestructor, isPureVirtual, visibility, constructorChain, hasFunctionTryBlock, hasVariableArguments );
try try
{ {
attachSymbolExtension( symbol, method ); attachSymbolExtension( symbol, method );

View file

@ -35,7 +35,7 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
* @param scope * @param scope
*/ */
public ASTFunction(IASTScope scope, String name, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, public ASTFunction(IASTScope scope, String name, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception,
boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplate ownerTemplate, boolean hasFunctionTryBlock ) boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplate ownerTemplate, boolean hasFunctionTryBlock, boolean hasVarArgs )
{ {
super(ownerTemplate != null ? null : scope ); super(ownerTemplate != null ? null : scope );
this.name = name; this.name = name;
@ -53,6 +53,7 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
qualifiedName = new ASTQualifiedNamedElement( scope, name ); qualifiedName = new ASTQualifiedNamedElement( scope, name );
setNameEndOffset(nameEndOffset); setNameEndOffset(nameEndOffset);
this.hasFunctionTryBlock = hasFunctionTryBlock; this.hasFunctionTryBlock = hasFunctionTryBlock;
this.varArgs = hasVarArgs;
} }
private boolean previouslyDeclared; private boolean previouslyDeclared;
@ -265,6 +266,7 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
} }
private boolean hasFunctionTryBlock = false; private boolean hasFunctionTryBlock = false;
private final boolean varArgs;
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.parser.ast.IASTFunction#setHasFunctionTryBlock(boolean) * @see org.eclipse.cdt.core.parser.ast.IASTFunction#setHasFunctionTryBlock(boolean)
*/ */
@ -280,4 +282,10 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
{ {
return hasFunctionTryBlock; return hasFunctionTryBlock;
} }
/* (non-Javadoc)
* @see org.eclipse.cdt.core.parser.ast.IASTFunction#takesVarArgs()
*/
public boolean takesVarArgs() {
return varArgs;
}
} }

View file

@ -71,7 +71,7 @@ public class ASTMethod extends ASTFunction implements IASTMethod
boolean isVirtual, boolean isVirtual,
boolean isExplicit, boolean isExplicit,
boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChainElements, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChainElements,
boolean hasFunctionTryBlock ) boolean hasFunctionTryBlock, boolean hasVarArgs )
{ {
super( super(
scope, scope,
@ -85,7 +85,7 @@ public class ASTMethod extends ASTFunction implements IASTMethod
isStatic, isStatic,
startOffset, startOffset,
nameOffset, nameOffset,
ownerTemplate, hasFunctionTryBlock); ownerTemplate, hasFunctionTryBlock, hasVarArgs);
this.isVirtual = isVirtual; this.isVirtual = isVirtual;
this.isPureVirtual = isPureVirtual; this.isPureVirtual = isPureVirtual;
this.isConstructor = isConstructor; this.isConstructor = isConstructor;

View file

@ -185,17 +185,17 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createFunction(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, java.util.List, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification, boolean, boolean, boolean, int, int, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration) * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createFunction(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, java.util.List, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification, boolean, boolean, boolean, int, int, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
*/ */
public IASTFunction createFunction(IASTScope scope, ITokenDuple name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, int nameEndOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock ) public IASTFunction createFunction(IASTScope scope, ITokenDuple name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, int nameEndOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments )
{ {
return new ASTFunction(scope, name.toString(), nameEndOffset, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate, hasFunctionTryBlock ); return new ASTFunction(scope, name.toString(), nameEndOffset, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate, hasFunctionTryBlock, hasVariableArguments );
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createMethod(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, java.util.List, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification, boolean, boolean, boolean, int, int, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration, boolean, boolean, boolean, boolean, boolean, boolean, boolean, org.eclipse.cdt.core.parser.ast.ASTAccessVisibility) * @see org.eclipse.cdt.core.parser.ast.IASTFactory#createMethod(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, java.util.List, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, org.eclipse.cdt.core.parser.ast.IASTExceptionSpecification, boolean, boolean, boolean, int, int, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration, boolean, boolean, boolean, boolean, boolean, boolean, boolean, org.eclipse.cdt.core.parser.ast.ASTAccessVisibility)
*/ */
public IASTMethod createMethod(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, int nameEndOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock ) public IASTMethod createMethod(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, int nameEndOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments )
{ {
return new ASTMethod(scope, name, nameEndOffset, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate, isConst, isVolatile, false, false, isVirtual, isExplicit, isPureVirtual, visibility, constructorChain, hasFunctionTryBlock); return new ASTMethod(scope, name, nameEndOffset, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate, isConst, isVolatile, false, false, isVirtual, isExplicit, isPureVirtual, visibility, constructorChain, hasFunctionTryBlock, hasVariableArguments);
} }
/* (non-Javadoc) /* (non-Javadoc)