mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-02 13:13:36 +02:00
CORE
Continued work on Bug 43062 : Outline is confused on operator methods containing spaces Partial fix for Bug 43680 : Fix Parser Error Handling TEST Added testErrorHandling_1() to CompleteParseASTTest.java.
This commit is contained in:
parent
3340b03ebf
commit
e95da4dade
68 changed files with 1068 additions and 234 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2003-09-29 John Camelon
|
||||||
|
Added testErrorHandling_1() to CompleteParseASTTest.java.
|
||||||
|
|
||||||
2003-09-26 John Camelon
|
2003-09-26 John Camelon
|
||||||
Added QuickParseASTTests::testBug43644() & testBug43062().
|
Added QuickParseASTTests::testBug43644() & testBug43062().
|
||||||
Moved ASTFailedTests::testBug39531() to QuickParseASTTests.
|
Moved ASTFailedTests::testBug39531() to QuickParseASTTests.
|
||||||
|
|
|
@ -844,4 +844,16 @@ public class CompleteParseASTTest extends CompleteParseBaseTest
|
||||||
assertFalse( i.hasNext() );
|
assertFalse( i.hasNext() );
|
||||||
assertAllReferences( 8, createTaskList( new Task( SD_02), new Task( SD_01, 3 ), new Task( a ), new Task( f_SD_01 ), new Task( f_SD_02 ), new Task( next ) ));
|
assertAllReferences( 8, createTaskList( new Task( SD_02), new Task( SD_01, 3 ), new Task( a ), new Task( f_SD_01 ), new Task( f_SD_02 ), new Task( next ) ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testErrorHandling_1() throws Exception
|
||||||
|
{
|
||||||
|
Iterator i = parse( "A anA; int x = c; class A {}; A * anotherA = &anA; int b;", false ).getDeclarations();
|
||||||
|
IASTVariable x = (IASTVariable)i.next();
|
||||||
|
assertEquals( x.getName(), "x");
|
||||||
|
IASTClassSpecifier A = (IASTClassSpecifier)((IASTAbstractTypeSpecifierDeclaration)i.next()).getTypeSpecifier();
|
||||||
|
IASTVariable anotherA = (IASTVariable)i.next();
|
||||||
|
IASTVariable b = (IASTVariable)i.next();
|
||||||
|
assertEquals( b.getName(), "b");
|
||||||
|
assertFalse(i.hasNext());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -666,14 +666,19 @@ public class CompleteParseBaseTest extends TestCase
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
protected FullParseCallback callback;
|
protected FullParseCallback callback;
|
||||||
protected IASTScope parse(String code) throws ParserException
|
|
||||||
|
protected IASTScope parse( String code ) throws ParserException
|
||||||
|
{
|
||||||
|
return parse( code, true );
|
||||||
|
}
|
||||||
|
protected IASTScope parse(String code, boolean throwOnError) throws ParserException
|
||||||
{
|
{
|
||||||
callback = new FullParseCallback();
|
callback = new FullParseCallback();
|
||||||
IParser parser = ParserFactory.createParser(
|
IParser parser = ParserFactory.createParser(
|
||||||
ParserFactory.createScanner( new StringReader( code ), "test-code", new ScannerInfo(),
|
ParserFactory.createScanner( new StringReader( code ), "test-code", new ScannerInfo(),
|
||||||
ParserMode.COMPLETE_PARSE, ParserLanguage.CPP, callback ), callback, ParserMode.COMPLETE_PARSE, ParserLanguage.CPP
|
ParserMode.COMPLETE_PARSE, ParserLanguage.CPP, callback ), callback, ParserMode.COMPLETE_PARSE, ParserLanguage.CPP
|
||||||
);
|
);
|
||||||
if( ! parser.parse() ) throw new ParserException( "FAILURE");
|
if( ! parser.parse() && throwOnError ) throw new ParserException( "FAILURE");
|
||||||
return callback.getCompilationUnit();
|
return callback.getCompilationUnit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2003-09-29 John Camelon
|
||||||
|
Continued work on Bug 43062 : Outline is confused on operator methods containing spaces
|
||||||
|
Partial fix for Bug 43680 : Fix Parser Error Handling
|
||||||
|
|
||||||
2003-09-26 John Camelon
|
2003-09-26 John Camelon
|
||||||
Fixed Bug 43644 : 6 triangle icons appearing in outline viewer when typing an error
|
Fixed Bug 43644 : 6 triangle icons appearing in outline viewer when typing an error
|
||||||
Fixed Bug 43062 : Outline is confused on operator methods containing spaces
|
Fixed Bug 43062 : Outline is confused on operator methods containing spaces
|
||||||
|
|
|
@ -43,20 +43,6 @@ public interface IParser {
|
||||||
*/
|
*/
|
||||||
public IASTExpression expression(IASTScope scope) throws Backtrack;
|
public IASTExpression expression(IASTScope scope) throws Backtrack;
|
||||||
|
|
||||||
/**
|
|
||||||
* Is the parser configured for ANSI C or ANSI C++?
|
|
||||||
*
|
|
||||||
* @return true for C++, false for C
|
|
||||||
*/
|
|
||||||
public ParserLanguage getLanguage();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the Parser explicitly to be a C or C++ parser.
|
|
||||||
*
|
|
||||||
* @param l CPP or C
|
|
||||||
*/
|
|
||||||
public void setLanguage( ParserLanguage l);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If an error was encountered, give us the offset of the token that caused the error.
|
* If an error was encountered, give us the offset of the token that caused the error.
|
||||||
*
|
*
|
||||||
|
|
|
@ -23,15 +23,15 @@ public interface IASTFactory
|
||||||
public IASTMacro createMacro(
|
public IASTMacro createMacro(
|
||||||
String name,
|
String name,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int endingOffset,
|
int nameOffset,
|
||||||
int nameOffset);
|
int nameEndOffset, int endingOffset);
|
||||||
public IASTInclusion createInclusion(
|
public IASTInclusion createInclusion(
|
||||||
String name,
|
String name,
|
||||||
String fileName,
|
String fileName,
|
||||||
boolean local,
|
boolean local,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int endingOffset,
|
int nameOffset,
|
||||||
int nameOffset);
|
int nameEndOffset, int endingOffset);
|
||||||
public IASTUsingDirective createUsingDirective(
|
public IASTUsingDirective createUsingDirective(
|
||||||
IASTScope scope,
|
IASTScope scope,
|
||||||
ITokenDuple duple, int startingOffset, int endingOffset)
|
ITokenDuple duple, int startingOffset, int endingOffset)
|
||||||
|
@ -49,7 +49,7 @@ public interface IASTFactory
|
||||||
IASTScope scope,
|
IASTScope scope,
|
||||||
String identifier,
|
String identifier,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int nameOffset) throws ASTSemanticException;
|
int nameOffset, int nameEndOffset) throws ASTSemanticException;
|
||||||
|
|
||||||
public IASTNamespaceAlias createNamespaceAlias(
|
public IASTNamespaceAlias createNamespaceAlias(
|
||||||
IASTScope scope,
|
IASTScope scope,
|
||||||
|
@ -57,7 +57,7 @@ public interface IASTFactory
|
||||||
ITokenDuple alias,
|
ITokenDuple alias,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int nameOffset,
|
int nameOffset,
|
||||||
int endOffset ) throws ASTSemanticException;
|
int nameEndOffset, int endOffset ) throws ASTSemanticException;
|
||||||
|
|
||||||
public IASTCompilationUnit createCompilationUnit();
|
public IASTCompilationUnit createCompilationUnit();
|
||||||
public IASTLinkageSpecification createLinkageSpecification(
|
public IASTLinkageSpecification createLinkageSpecification(
|
||||||
|
@ -70,7 +70,7 @@ public interface IASTFactory
|
||||||
ClassNameType type,
|
ClassNameType type,
|
||||||
ASTAccessVisibility access,
|
ASTAccessVisibility access,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int nameOffset) throws ASTSemanticException;
|
int nameOffset, int nameEndOffset) throws ASTSemanticException;
|
||||||
/**
|
/**
|
||||||
* @param astClassSpec
|
* @param astClassSpec
|
||||||
* @param isVirtual
|
* @param isVirtual
|
||||||
|
@ -90,12 +90,12 @@ public interface IASTFactory
|
||||||
public IASTEnumerationSpecifier createEnumerationSpecifier(
|
public IASTEnumerationSpecifier createEnumerationSpecifier(
|
||||||
IASTScope scope,
|
IASTScope scope,
|
||||||
String name,
|
String name,
|
||||||
int startingOffset, int nameOffset) throws ASTSemanticException;
|
int startingOffset, int nameOffset, int nameEndOffset) throws ASTSemanticException;
|
||||||
public void addEnumerator(
|
public void addEnumerator(
|
||||||
IASTEnumerationSpecifier enumeration,
|
IASTEnumerationSpecifier enumeration,
|
||||||
String string,
|
String string,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int endingOffset, IASTExpression initialValue)throws ASTSemanticException;
|
int nameOffset, int nameEndOffset, int endingOffset, IASTExpression initialValue)throws ASTSemanticException;
|
||||||
public IASTExpression createExpression(
|
public IASTExpression createExpression(
|
||||||
IASTScope scope,
|
IASTScope scope,
|
||||||
IASTExpression.Kind kind,
|
IASTExpression.Kind kind,
|
||||||
|
@ -133,7 +133,6 @@ public interface IASTFactory
|
||||||
public IASTFunction createFunction(
|
public IASTFunction createFunction(
|
||||||
IASTScope scope,
|
IASTScope scope,
|
||||||
String name,
|
String name,
|
||||||
int nameEndOffset,
|
|
||||||
List parameters,
|
List parameters,
|
||||||
IASTAbstractDeclaration returnType,
|
IASTAbstractDeclaration returnType,
|
||||||
IASTExceptionSpecification exception,
|
IASTExceptionSpecification exception,
|
||||||
|
@ -142,6 +141,7 @@ public interface IASTFactory
|
||||||
boolean isStatic,
|
boolean isStatic,
|
||||||
int startOffset,
|
int startOffset,
|
||||||
int nameOffset,
|
int nameOffset,
|
||||||
|
int nameEndOffset,
|
||||||
IASTTemplate ownerTemplate,
|
IASTTemplate ownerTemplate,
|
||||||
boolean isConst,
|
boolean isConst,
|
||||||
boolean isVolatile,
|
boolean isVolatile,
|
||||||
|
@ -156,7 +156,6 @@ public interface IASTFactory
|
||||||
public IASTMethod createMethod(
|
public IASTMethod createMethod(
|
||||||
IASTScope scope,
|
IASTScope scope,
|
||||||
String name,
|
String name,
|
||||||
int nameEndOffset,
|
|
||||||
List parameters,
|
List parameters,
|
||||||
IASTAbstractDeclaration returnType,
|
IASTAbstractDeclaration returnType,
|
||||||
IASTExceptionSpecification exception,
|
IASTExceptionSpecification exception,
|
||||||
|
@ -165,6 +164,7 @@ public interface IASTFactory
|
||||||
boolean isStatic,
|
boolean isStatic,
|
||||||
int startOffset,
|
int startOffset,
|
||||||
int nameOffset,
|
int nameOffset,
|
||||||
|
int nameEndOffset,
|
||||||
IASTTemplate ownerTemplate,
|
IASTTemplate ownerTemplate,
|
||||||
boolean isConst,
|
boolean isConst,
|
||||||
boolean isVolatile,
|
boolean isVolatile,
|
||||||
|
@ -173,11 +173,11 @@ public interface IASTFactory
|
||||||
boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isDefinition) throws ASTSemanticException;
|
boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isDefinition) 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, IASTExpression constructorExpression ) throws ASTSemanticException;
|
IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, int nameEndOffset, IASTExpression constructorExpression ) throws ASTSemanticException;
|
||||||
|
|
||||||
public IASTField createField( IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, IASTExpression constructorExpression, ASTAccessVisibility visibility) throws ASTSemanticException;
|
public IASTField createField( 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, ASTAccessVisibility visibility) throws ASTSemanticException;
|
||||||
|
|
||||||
public IASTParameterDeclaration createParameterDeclaration( boolean isConst, boolean isVolatile, IASTTypeSpecifier getTypeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset );
|
public IASTParameterDeclaration createParameterDeclaration( boolean isConst, boolean isVolatile, IASTTypeSpecifier getTypeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset );
|
||||||
|
|
||||||
public IASTTemplateDeclaration createTemplateDeclaration( IASTScope scope, List templateParameters, boolean exported, int startingOffset );
|
public IASTTemplateDeclaration createTemplateDeclaration( IASTScope scope, List templateParameters, boolean exported, int startingOffset );
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ public interface IASTFactory
|
||||||
|
|
||||||
public IASTTemplateSpecialization createTemplateSpecialization(IASTScope scope, int startingOffset);
|
public IASTTemplateSpecialization createTemplateSpecialization(IASTScope scope, int startingOffset);
|
||||||
|
|
||||||
public IASTTypedefDeclaration createTypedef( IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset ) throws ASTSemanticException;
|
public IASTTypedefDeclaration createTypedef( IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, int nameEndOffset ) throws ASTSemanticException;
|
||||||
|
|
||||||
public IASTAbstractTypeSpecifierDeclaration createTypeSpecDeclaration( IASTScope scope, IASTTypeSpecifier typeSpecifier, IASTTemplate template, int startingOffset, int endingOffset);
|
public IASTAbstractTypeSpecifierDeclaration createTypeSpecDeclaration( IASTScope scope, IASTTypeSpecifier typeSpecifier, IASTTemplate template, int startingOffset, int endingOffset);
|
||||||
|
|
||||||
|
|
|
@ -35,5 +35,4 @@ public interface IASTFunction extends IASTCodeScope, IASTOffsetableNamedElement,
|
||||||
|
|
||||||
public boolean previouslyDeclared();
|
public boolean previouslyDeclared();
|
||||||
|
|
||||||
public int getNameEndOffset(); // necessary for operator new, etc. which are > 1 token
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,4 +20,6 @@ public interface IASTOffsetableNamedElement extends IASTOffsetableElement {
|
||||||
public String getName();
|
public String getName();
|
||||||
public int getNameOffset();
|
public int getNameOffset();
|
||||||
public void setNameOffset( int o );
|
public void setNameOffset( int o );
|
||||||
|
public int getNameEndOffset();
|
||||||
|
public void setNameEndOffset( int o );
|
||||||
}
|
}
|
||||||
|
|
|
@ -381,9 +381,9 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
||||||
return astFactory.createTypedef(
|
return astFactory.createTypedef(
|
||||||
scope,
|
scope,
|
||||||
name,
|
name,
|
||||||
abs, getStartingOffset(), d.getNameStartOffset() );
|
abs, getStartingOffset(), d.getNameStartOffset(), d.getNameEndOffset() );
|
||||||
else
|
else
|
||||||
return astFactory.createVariable( scope, name, auto, d.getInitializerClause(), d.getBitFieldExpression(), abs, mutable, extern, register, staticc, getStartingOffset(), d.getNameStartOffset(), d.getConstructorExpression() );
|
return astFactory.createVariable( scope, name, auto, d.getInitializerClause(), d.getBitFieldExpression(), abs, mutable, extern, register, staticc, getStartingOffset(), d.getNameStartOffset(), d.getNameEndOffset(), d.getConstructorExpression() );
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -406,7 +406,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
||||||
constt,
|
constt,
|
||||||
volatil,
|
volatil,
|
||||||
getTypeSpecifier(),
|
getTypeSpecifier(),
|
||||||
declarator.getPointerOperators(), declarator.getArrayModifiers(), null, null), startingOffset, declarator.getNameStartOffset());
|
declarator.getPointerOperators(), declarator.getArrayModifiers(), null, null), startingOffset, declarator.getNameStartOffset(), declarator.getNameEndOffset());
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @param declarator
|
* @param declarator
|
||||||
|
@ -418,8 +418,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
||||||
.createMethod(
|
.createMethod(
|
||||||
scope,
|
scope,
|
||||||
nested ? declarator.getOwnedDeclarator().getName() : declarator.getName(),
|
nested ? declarator.getOwnedDeclarator().getName() : declarator.getName(),
|
||||||
declarator.getNameEndOffset(),
|
createParameterList(declarator.getParameters()),
|
||||||
createParameterList(declarator.getParameters()),
|
|
||||||
astFactory.createAbstractDeclaration(
|
astFactory.createAbstractDeclaration(
|
||||||
constt,
|
constt,
|
||||||
volatil,
|
volatil,
|
||||||
|
@ -431,6 +430,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
||||||
staticc,
|
staticc,
|
||||||
startingOffset,
|
startingOffset,
|
||||||
declarator.getNameStartOffset(),
|
declarator.getNameStartOffset(),
|
||||||
|
declarator.getNameEndOffset(),
|
||||||
templateDeclaration,
|
templateDeclaration,
|
||||||
declarator.isConst(),
|
declarator.isConst(),
|
||||||
declarator.isVolatile(),
|
declarator.isVolatile(),
|
||||||
|
@ -448,7 +448,6 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
||||||
return astFactory.createFunction(
|
return astFactory.createFunction(
|
||||||
scope,
|
scope,
|
||||||
nested ? declarator.getOwnedDeclarator().getName() : declarator.getName(),
|
nested ? declarator.getOwnedDeclarator().getName() : declarator.getName(),
|
||||||
declarator.getNameEndOffset(),
|
|
||||||
createParameterList(declarator.getParameters()),
|
createParameterList(declarator.getParameters()),
|
||||||
astFactory.createAbstractDeclaration(
|
astFactory.createAbstractDeclaration(
|
||||||
constt,
|
constt,
|
||||||
|
@ -461,6 +460,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
||||||
staticc,
|
staticc,
|
||||||
startingOffset,
|
startingOffset,
|
||||||
declarator.getNameStartOffset(),
|
declarator.getNameStartOffset(),
|
||||||
|
declarator.getNameEndOffset(),
|
||||||
templateDeclaration,
|
templateDeclaration,
|
||||||
declarator.isConst(),
|
declarator.isConst(),
|
||||||
declarator.isVolatile(),
|
declarator.isVolatile(),
|
||||||
|
@ -492,7 +492,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
||||||
staticc,
|
staticc,
|
||||||
startingOffset,
|
startingOffset,
|
||||||
declarator.getNameStartOffset(),
|
declarator.getNameStartOffset(),
|
||||||
declarator.getConstructorExpression(), ((IASTClassSpecifier)scope).getCurrentVisibilityMode());
|
declarator.getNameEndOffset(), declarator.getConstructorExpression(), ((IASTClassSpecifier)scope).getCurrentVisibilityMode());
|
||||||
}
|
}
|
||||||
private List createParameterList(List currentParameters)
|
private List createParameterList(List currentParameters)
|
||||||
{
|
{
|
||||||
|
@ -514,7 +514,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
||||||
declarator.getArrayModifiers(),
|
declarator.getArrayModifiers(),
|
||||||
null, null, declarator.getName() == null
|
null, null, declarator.getName() == null
|
||||||
? ""
|
? ""
|
||||||
: declarator.getName(), declarator.getInitializerClause(), wrapper.getStartingOffset(), wrapper.getEndOffset(), declarator.getNameStartOffset()));
|
: declarator.getName(), declarator.getInitializerClause(), wrapper.getStartingOffset(), declarator.getNameStartOffset(), declarator.getNameEndOffset(), wrapper.getEndOffset()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -541,7 +541,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
||||||
register,
|
register,
|
||||||
staticc,
|
staticc,
|
||||||
getStartingOffset(),
|
getStartingOffset(),
|
||||||
declarator.getNameStartOffset(), declarator.getConstructorExpression());
|
declarator.getNameStartOffset(), declarator.getNameEndOffset(), declarator.getConstructorExpression());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -128,7 +128,7 @@ public class Parser implements IParser
|
||||||
requestor = callback;
|
requestor = callback;
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
this.language = language;
|
this.language = language;
|
||||||
astFactory = ParserFactory.createASTFactory(mode, language);
|
astFactory = ParserFactory.createASTFactory( mode, language);
|
||||||
scanner.setASTFactory(astFactory);
|
scanner.setASTFactory(astFactory);
|
||||||
}
|
}
|
||||||
// counter that keeps track of the number of times Parser.parse() is called
|
// counter that keeps track of the number of times Parser.parse() is called
|
||||||
|
@ -606,7 +606,7 @@ public class Parser implements IParser
|
||||||
declarator.getArrayModifiers(),
|
declarator.getArrayModifiers(),
|
||||||
null, null, declarator.getName() == null
|
null, null, declarator.getName() == null
|
||||||
? ""
|
? ""
|
||||||
: declarator.getName(), declarator.getInitializerClause(), wrapper.getStartingOffset(), wrapper.getEndOffset(), declarator.getNameStartOffset()),
|
: declarator.getName(), declarator.getInitializerClause(), wrapper.getStartingOffset(), declarator.getNameStartOffset(), declarator.getNameEndOffset(), wrapper.getEndOffset()),
|
||||||
null));
|
null));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -757,7 +757,8 @@ public class Parser implements IParser
|
||||||
scope,
|
scope,
|
||||||
(identifier == null ? "" : identifier.getImage()),
|
(identifier == null ? "" : identifier.getImage()),
|
||||||
first.getOffset(),
|
first.getOffset(),
|
||||||
(identifier == null ? first.getOffset() : identifier.getOffset()));
|
(identifier == null ? first.getOffset() : identifier.getOffset()),
|
||||||
|
(identifier == null ? first.getEndOffset() : identifier.getEndOffset() ));
|
||||||
}
|
}
|
||||||
catch (ASTSemanticException e)
|
catch (ASTSemanticException e)
|
||||||
{
|
{
|
||||||
|
@ -808,7 +809,7 @@ public class Parser implements IParser
|
||||||
{
|
{
|
||||||
astFactory.createNamespaceAlias(
|
astFactory.createNamespaceAlias(
|
||||||
scope, identifier.toString(), duple, first.getOffset(),
|
scope, identifier.toString(), duple, first.getOffset(),
|
||||||
identifier.getOffset(), duple.getLastToken().getEndOffset() );
|
identifier.getOffset(), identifier.getEndOffset(), duple.getLastToken().getEndOffset() );
|
||||||
}
|
}
|
||||||
catch (ASTSemanticException e)
|
catch (ASTSemanticException e)
|
||||||
{
|
{
|
||||||
|
@ -2315,7 +2316,9 @@ public class Parser implements IParser
|
||||||
mark.getOffset(),
|
mark.getOffset(),
|
||||||
((identifier == null)
|
((identifier == null)
|
||||||
? mark.getOffset()
|
? mark.getOffset()
|
||||||
: identifier.getOffset()));
|
: identifier.getOffset()),
|
||||||
|
((identifier == null)? mark.getEndOffset()
|
||||||
|
: identifier.getEndOffset()));
|
||||||
}
|
}
|
||||||
catch (ASTSemanticException e)
|
catch (ASTSemanticException e)
|
||||||
{
|
{
|
||||||
|
@ -2349,8 +2352,8 @@ public class Parser implements IParser
|
||||||
enumeration,
|
enumeration,
|
||||||
enumeratorIdentifier.getImage(),
|
enumeratorIdentifier.getImage(),
|
||||||
enumeratorIdentifier.getOffset(),
|
enumeratorIdentifier.getOffset(),
|
||||||
enumeratorIdentifier.getEndOffset(),
|
enumeratorIdentifier.getOffset(),
|
||||||
initialValue);
|
enumeratorIdentifier.getEndOffset(), enumeratorIdentifier.getEndOffset(), initialValue);
|
||||||
}
|
}
|
||||||
catch (ASTSemanticException e1)
|
catch (ASTSemanticException e1)
|
||||||
{
|
{
|
||||||
|
@ -2369,8 +2372,8 @@ public class Parser implements IParser
|
||||||
enumeration,
|
enumeration,
|
||||||
enumeratorIdentifier.getImage(),
|
enumeratorIdentifier.getImage(),
|
||||||
enumeratorIdentifier.getOffset(),
|
enumeratorIdentifier.getOffset(),
|
||||||
enumeratorIdentifier.getEndOffset(),
|
enumeratorIdentifier.getOffset(),
|
||||||
initialValue);
|
enumeratorIdentifier.getEndOffset(), enumeratorIdentifier.getEndOffset(), initialValue);
|
||||||
}
|
}
|
||||||
catch (ASTSemanticException e1)
|
catch (ASTSemanticException e1)
|
||||||
{
|
{
|
||||||
|
@ -2452,7 +2455,8 @@ public class Parser implements IParser
|
||||||
nameType,
|
nameType,
|
||||||
access,
|
access,
|
||||||
classKey.getOffset(),
|
classKey.getOffset(),
|
||||||
duple == null ? classKey.getOffset() : duple.getFirstToken().getOffset());
|
duple == null ? classKey.getOffset() : duple.getFirstToken().getOffset(),
|
||||||
|
duple == null ? classKey.getEndOffset() : duple.getFirstToken().getEndOffset() );
|
||||||
}
|
}
|
||||||
catch (ASTSemanticException e)
|
catch (ASTSemanticException e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -344,7 +344,7 @@ public class Scanner implements IScanner {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (inclusionReader != null) {
|
if (inclusionReader != null) {
|
||||||
IASTInclusion inclusion = astFactory.createInclusion( fileName, newPath, !useIncludePaths, beginOffset, endOffset, nameOffset );
|
IASTInclusion inclusion = astFactory.createInclusion( fileName, newPath, !useIncludePaths, beginOffset, nameOffset, nameOffset + fileName.length(), endOffset );
|
||||||
contextStack.updateContext(inclusionReader, newPath, ScannerContext.INCLUSION, inclusion, requestor );
|
contextStack.updateContext(inclusionReader, newPath, ScannerContext.INCLUSION, inclusion, requestor );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2011,7 +2011,7 @@ public class Scanner implements IScanner {
|
||||||
if( requestor != null )
|
if( requestor != null )
|
||||||
{
|
{
|
||||||
IASTInclusion i = astFactory.createInclusion( f, "", !useIncludePath, beginningOffset,
|
IASTInclusion i = astFactory.createInclusion( f, "", !useIncludePath, beginningOffset,
|
||||||
endOffset, startOffset );
|
startOffset, startOffset + f.length(), endOffset );
|
||||||
i.enterScope( requestor );
|
i.enterScope( requestor );
|
||||||
i.exitScope( requestor );
|
i.exitScope( requestor );
|
||||||
}
|
}
|
||||||
|
@ -2168,7 +2168,7 @@ public class Scanner implements IScanner {
|
||||||
throw new ScannerException( ScannerException.ErrorCode.INVALID_PREPROCESSOR_DIRECTIVE, getCurrentFile(), getCurrentOffset() );
|
throw new ScannerException( ScannerException.ErrorCode.INVALID_PREPROCESSOR_DIRECTIVE, getCurrentFile(), getCurrentOffset() );
|
||||||
}
|
}
|
||||||
|
|
||||||
astFactory.createMacro( key, beginning, contextStack.getCurrentContext().getOffset(), offset ).acceptElement( requestor );
|
astFactory.createMacro( key, beginning, offset, offset + key.length(), contextStack.getCurrentContext().getOffset() ).acceptElement( requestor );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Vector getMacroParameters (String params, boolean forStringizing) throws ScannerException {
|
protected Vector getMacroParameters (String params, boolean forStringizing) throws ScannerException {
|
||||||
|
|
|
@ -19,14 +19,19 @@ import org.eclipse.cdt.core.parser.ast.IASTInclusion;
|
||||||
*/
|
*/
|
||||||
public class ASTInclusion implements IASTInclusion {
|
public class ASTInclusion implements IASTInclusion {
|
||||||
|
|
||||||
public ASTInclusion( String name, String fileName, boolean local )
|
public ASTInclusion( String name, String fileName, boolean local, int startingOffset, int nameOffset, int nameEndOffset, int endOffset )
|
||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.fileName = fileName;
|
this.fileName = fileName;
|
||||||
this.local = local;
|
this.local = local;
|
||||||
|
setStartingOffset(startingOffset);
|
||||||
|
setNameOffset(nameOffset);
|
||||||
|
setNameEndOffset(nameEndOffset);
|
||||||
|
setEndingOffset(endOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final String name, fileName;
|
private int nameEndOffset;
|
||||||
|
private final String name, fileName;
|
||||||
private final boolean local;
|
private final boolean local;
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTInclusion#getName()
|
* @see org.eclipse.cdt.core.parser.ast.IASTInclusion#getName()
|
||||||
|
@ -109,7 +114,14 @@ public class ASTInclusion implements IASTInclusion {
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterInclusion(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.enterInclusion(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -117,7 +129,28 @@ public class ASTInclusion implements IASTInclusion {
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitInclusion(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.exitInclusion(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return nameEndOffset;
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
nameEndOffset = o;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,10 +19,15 @@ import org.eclipse.cdt.core.parser.ast.IASTMacro;
|
||||||
*/
|
*/
|
||||||
public class ASTMacro implements IASTMacro {
|
public class ASTMacro implements IASTMacro {
|
||||||
|
|
||||||
private final String name;
|
private int nameEndOffset = 0;
|
||||||
public ASTMacro( String name )
|
private final String name;
|
||||||
|
public ASTMacro( String name, int start, int end, int nameBeg, int nameEnd )
|
||||||
{
|
{
|
||||||
this.name =name;
|
this.name =name;
|
||||||
|
setStartingOffset(start);
|
||||||
|
setNameOffset(nameBeg);
|
||||||
|
setNameEndOffset(nameEnd);
|
||||||
|
setEndingOffset(end);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int startingOffset = 0, endingOffset = 0, nameOffset = 0;
|
private int startingOffset = 0, endingOffset = 0, nameOffset = 0;
|
||||||
|
@ -74,7 +79,14 @@ public class ASTMacro implements IASTMacro {
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptMacro( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptMacro( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
@ -89,4 +101,18 @@ public class ASTMacro implements IASTMacro {
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return nameEndOffset;
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
nameEndOffset = o;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,22 +31,16 @@ public class BaseASTFactory {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createMacro(java.lang.String, int, int, int)
|
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createMacro(java.lang.String, int, int, int)
|
||||||
*/
|
*/
|
||||||
public IASTMacro createMacro(String name, int startingOffset, int endingOffset, int nameOffset) {
|
public IASTMacro createMacro(String name, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset) {
|
||||||
IASTMacro m = new ASTMacro( name );
|
IASTMacro m = new ASTMacro( name, startingOffset, endingOffset, nameOffset, nameEndOffset );
|
||||||
m.setStartingOffset( startingOffset );
|
|
||||||
m.setEndingOffset( endingOffset );
|
|
||||||
m.setNameOffset( nameOffset );
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createInclusion(java.lang.String, java.lang.String, boolean)
|
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createInclusion(java.lang.String, java.lang.String, boolean)
|
||||||
*/
|
*/
|
||||||
public IASTInclusion createInclusion(String name, String fileName, boolean local, int startingOffset, int endingOffset, int nameOffset) {
|
public IASTInclusion createInclusion(String name, String fileName, boolean local, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset) {
|
||||||
IASTInclusion inclusion = new ASTInclusion( name, fileName, local );
|
IASTInclusion inclusion = new ASTInclusion( name, fileName, local, startingOffset, nameOffset, nameEndOffset, endingOffset );
|
||||||
inclusion.setStartingOffset( startingOffset );
|
|
||||||
inclusion.setEndingOffset( endingOffset );
|
|
||||||
inclusion.setNameOffset( nameOffset );
|
|
||||||
return inclusion;
|
return inclusion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,8 @@ package org.eclipse.cdt.internal.core.parser.ast;
|
||||||
*/
|
*/
|
||||||
public class NamedOffsets extends Offsets {
|
public class NamedOffsets extends Offsets {
|
||||||
|
|
||||||
private int nameOffset = 0;
|
private int nameEndOffset = 0;
|
||||||
|
private int nameOffset = 0;
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getElementNameOffset()
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getElementNameOffset()
|
||||||
|
@ -33,5 +34,14 @@ public class NamedOffsets extends Offsets {
|
||||||
nameOffset = o;
|
nameOffset = o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return nameEndOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNameEndOffset( int offset )
|
||||||
|
{
|
||||||
|
nameEndOffset = offset;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,14 @@ public class ASTASMDefinition extends ASTAnonymousDeclaration implements IASTASM
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptASMDefinition(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptASMDefinition(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -46,7 +46,14 @@ public class ASTAbstractTypeSpecifierDeclaration
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptAbstractTypeSpecDeclaration(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptAbstractTypeSpecDeclaration(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -47,7 +47,14 @@ public class ASTClassReference
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptClassReference( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptClassReference( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
||||||
/**
|
/**
|
||||||
* @param symbol
|
* @param symbol
|
||||||
*/
|
*/
|
||||||
public ASTClassSpecifier(ISymbol symbol, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int nameOffset, List references )
|
public ASTClassSpecifier(ISymbol symbol, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int nameOffset, int nameEndOffset, List references )
|
||||||
{
|
{
|
||||||
super(symbol);
|
super(symbol);
|
||||||
classKind = kind;
|
classKind = kind;
|
||||||
|
@ -99,6 +99,7 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
||||||
currentVisibility = access;
|
currentVisibility = access;
|
||||||
setStartingOffset(startingOffset);
|
setStartingOffset(startingOffset);
|
||||||
setNameOffset(nameOffset);
|
setNameOffset(nameOffset);
|
||||||
|
setNameEndOffset(nameEndOffset);
|
||||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
|
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
|
||||||
this.references = new ASTReferenceStore( references );
|
this.references = new ASTReferenceStore( references );
|
||||||
}
|
}
|
||||||
|
@ -171,7 +172,14 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
references.processReferences( requestor );
|
references.processReferences( requestor );
|
||||||
requestor.enterClassSpecifier(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.enterClassSpecifier(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
Iterator i = getBaseClauses();
|
Iterator i = getBaseClauses();
|
||||||
while( i.hasNext() )
|
while( i.hasNext() )
|
||||||
{
|
{
|
||||||
|
@ -184,7 +192,14 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitClassSpecifier(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.exitClassSpecifier(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||||
|
@ -228,4 +243,18 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
||||||
{
|
{
|
||||||
return (IASTScope)symbol.getContainingSymbol().getASTExtension().getPrimaryDeclaration();
|
return (IASTScope)symbol.getContainingSymbol().getASTExtension().getPrimaryDeclaration();
|
||||||
}
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,14 +40,28 @@ public class ASTCodeScope extends ASTScope implements IASTCodeScope {
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor) {
|
public void enterScope(ISourceElementRequestor requestor) {
|
||||||
requestor.enterCodeBlock( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.enterCodeBlock( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exitScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exitScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor) {
|
public void exitScope(ISourceElementRequestor requestor) {
|
||||||
requestor.exitCodeBlock( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.exitCodeBlock( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -41,13 +41,27 @@ public class ASTCompilationUnit
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterCompilationUnit( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.enterCompilationUnit( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exitScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exitScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitCompilationUnit( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.exitCompilationUnit( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,12 +39,13 @@ public class ASTElaboratedTypeSpecifier extends ASTSymbol implements IASTElabora
|
||||||
* @param startingOffset
|
* @param startingOffset
|
||||||
* @param endOffset
|
* @param endOffset
|
||||||
*/
|
*/
|
||||||
public ASTElaboratedTypeSpecifier(ISymbol checkSymbol, ASTClassKind kind, int startingOffset, int nameOffset, int endOffset, List references, boolean isDecl )
|
public ASTElaboratedTypeSpecifier(ISymbol checkSymbol, ASTClassKind kind, int startingOffset, int nameOffset, int nameEndOffset, int endOffset, List references, boolean isDecl )
|
||||||
{
|
{
|
||||||
super( checkSymbol );
|
super( checkSymbol );
|
||||||
this.kind = kind;
|
this.kind = kind;
|
||||||
setStartingOffset( startingOffset );
|
setStartingOffset( startingOffset );
|
||||||
setNameOffset( nameOffset );
|
setNameOffset( nameOffset );
|
||||||
|
setNameEndOffset(nameEndOffset);
|
||||||
setEndingOffset( endOffset );
|
setEndingOffset( endOffset );
|
||||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), checkSymbol.getName() );
|
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), checkSymbol.getName() );
|
||||||
store = new ASTReferenceStore( references );
|
store = new ASTReferenceStore( references );
|
||||||
|
@ -106,7 +107,14 @@ public class ASTElaboratedTypeSpecifier extends ASTSymbol implements IASTElabora
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
if( isForwardDeclaration )
|
if( isForwardDeclaration )
|
||||||
requestor.acceptElaboratedForewardDeclaration(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptElaboratedForewardDeclaration(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
store.processReferences(requestor);
|
store.processReferences(requestor);
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -145,4 +153,19 @@ public class ASTElaboratedTypeSpecifier extends ASTSymbol implements IASTElabora
|
||||||
{
|
{
|
||||||
return references;
|
return references;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,14 @@ public class ASTEnumerationReference
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptEnumerationReference( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptEnumerationReference( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -34,11 +34,12 @@ public class ASTEnumerationSpecifier
|
||||||
/**
|
/**
|
||||||
* @param symbol
|
* @param symbol
|
||||||
*/
|
*/
|
||||||
public ASTEnumerationSpecifier(ISymbol symbol, int startingOffset, int nameOffset )
|
public ASTEnumerationSpecifier(ISymbol symbol, int startingOffset, int nameOffset, int nameEndOffset )
|
||||||
{
|
{
|
||||||
super(symbol);
|
super(symbol);
|
||||||
setStartingOffset(startingOffset);
|
setStartingOffset(startingOffset);
|
||||||
setNameOffset( nameOffset );
|
setNameOffset( nameOffset );
|
||||||
|
setNameEndOffset(nameEndOffset);
|
||||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
|
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +63,14 @@ public class ASTEnumerationSpecifier
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptEnumerationSpecifier(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptEnumerationSpecifier(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
@ -132,4 +140,19 @@ public class ASTEnumerationSpecifier
|
||||||
{
|
{
|
||||||
return offsets.getEndingOffset();
|
return offsets.getEndingOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ import org.eclipse.cdt.core.parser.ISourceElementRequestor;
|
||||||
import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier;
|
import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier;
|
||||||
import org.eclipse.cdt.core.parser.ast.IASTEnumerator;
|
import org.eclipse.cdt.core.parser.ast.IASTEnumerator;
|
||||||
import org.eclipse.cdt.core.parser.ast.IASTExpression;
|
import org.eclipse.cdt.core.parser.ast.IASTExpression;
|
||||||
import org.eclipse.cdt.internal.core.parser.ast.Offsets;
|
import org.eclipse.cdt.internal.core.parser.ast.NamedOffsets;
|
||||||
import org.eclipse.cdt.internal.core.parser.pst.ISymbol;
|
import org.eclipse.cdt.internal.core.parser.pst.ISymbol;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,7 +23,7 @@ import org.eclipse.cdt.internal.core.parser.pst.ISymbol;
|
||||||
*/
|
*/
|
||||||
public class ASTEnumerator extends ASTSymbol implements IASTEnumerator
|
public class ASTEnumerator extends ASTSymbol implements IASTEnumerator
|
||||||
{
|
{
|
||||||
private Offsets offsets = new Offsets();
|
private NamedOffsets offsets = new NamedOffsets();
|
||||||
private final IASTExpression initialValue;
|
private final IASTExpression initialValue;
|
||||||
private final IASTEnumerationSpecifier owner;
|
private final IASTEnumerationSpecifier owner;
|
||||||
/**
|
/**
|
||||||
|
@ -32,10 +32,12 @@ public class ASTEnumerator extends ASTSymbol implements IASTEnumerator
|
||||||
* @param endingOffset
|
* @param endingOffset
|
||||||
* @param initialValue
|
* @param initialValue
|
||||||
*/
|
*/
|
||||||
public ASTEnumerator(ISymbol enumeratorSymbol, IASTEnumerationSpecifier owner, int startingOffset, int endingOffset, IASTExpression initialValue)
|
public ASTEnumerator(ISymbol enumeratorSymbol, IASTEnumerationSpecifier owner, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset, IASTExpression initialValue)
|
||||||
{
|
{
|
||||||
super( enumeratorSymbol );
|
super( enumeratorSymbol );
|
||||||
setStartingOffset(startingOffset);
|
setStartingOffset(startingOffset);
|
||||||
|
setNameOffset( nameOffset );
|
||||||
|
setNameEndOffset( nameEndOffset );
|
||||||
setEndingOffset( endingOffset );
|
setEndingOffset( endingOffset );
|
||||||
this.initialValue = initialValue;
|
this.initialValue = initialValue;
|
||||||
this.owner = owner;
|
this.owner = owner;
|
||||||
|
@ -121,4 +123,19 @@ public class ASTEnumerator extends ASTSymbol implements IASTEnumerator
|
||||||
{
|
{
|
||||||
return offsets.getEndingOffset();
|
return offsets.getEndingOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,14 @@ public class ASTEnumeratorReference extends ASTReference implements IASTEnumerat
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptEnumeratorReference( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptEnumeratorReference( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -37,9 +37,9 @@ public class ASTField extends ASTVariable implements IASTField
|
||||||
* @param references
|
* @param references
|
||||||
* @param visibility
|
* @param visibility
|
||||||
*/
|
*/
|
||||||
public ASTField(ISymbol newSymbol, IASTAbstractDeclaration abstractDeclaration, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, int startingOffset, int nameOffset, List references, boolean previouslyDeclared, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
public ASTField(ISymbol newSymbol, IASTAbstractDeclaration abstractDeclaration, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, int startingOffset, int nameOffset, int nameEndOffset, List references, boolean previouslyDeclared, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
||||||
{
|
{
|
||||||
super( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, references, constructorExpression, previouslyDeclared );
|
super( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, nameEndOffset, references, constructorExpression, previouslyDeclared );
|
||||||
this.visibility = visibility;
|
this.visibility = visibility;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,14 @@ public class ASTField extends ASTVariable implements IASTField
|
||||||
|
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptField(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptField(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
referenceDelegate.processReferences(requestor);
|
referenceDelegate.processReferences(requestor);
|
||||||
if( getInitializerClause() != null )
|
if( getInitializerClause() != null )
|
||||||
getInitializerClause().acceptElement(requestor);
|
getInitializerClause().acceptElement(requestor);
|
||||||
|
|
|
@ -47,7 +47,14 @@ public class ASTFieldReference
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptFieldReference(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptFieldReference(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -62,6 +62,7 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
||||||
this.exception = exception;
|
this.exception = exception;
|
||||||
setStartingOffset(startOffset);
|
setStartingOffset(startOffset);
|
||||||
setNameOffset(nameOffset);
|
setNameOffset(nameOffset);
|
||||||
|
setNameEndOffset(nameEndOffset);
|
||||||
this.ownerTemplate = ownerTemplate;
|
this.ownerTemplate = ownerTemplate;
|
||||||
this.references = new ASTReferenceStore( references );
|
this.references = new ASTReferenceStore( references );
|
||||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
|
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
|
||||||
|
@ -195,7 +196,14 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptFunctionDeclaration(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptFunctionDeclaration(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
functionCallbacks(requestor);
|
functionCallbacks(requestor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +241,14 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterFunctionBody( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.enterFunctionBody( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
functionCallbacks( requestor );
|
functionCallbacks( requestor );
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -241,7 +256,14 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitFunctionBody( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.exitFunctionBody( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -263,13 +285,18 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
||||||
return previouslyDeclared;
|
return previouslyDeclared;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
/* (non-Javadoc)
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTFunction#getNameEndOffset()
|
*/
|
||||||
*/
|
public int getNameEndOffset()
|
||||||
public int getNameEndOffset()
|
{
|
||||||
{
|
return offsets.getNameEndOffset();
|
||||||
// TODO Auto-generated method stub
|
}
|
||||||
return 0;
|
/* (non-Javadoc)
|
||||||
}
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,14 @@ public class ASTFunctionReference
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptFunctionReference( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptFunctionReference( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -89,13 +89,27 @@ public class ASTLinkageSpecification extends ASTAnonymousDeclaration implements
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterLinkageSpecification(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.enterLinkageSpecification(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exitScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exitScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitLinkageSpecification(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.exitLinkageSpecification(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,7 +126,14 @@ public class ASTMethod extends ASTFunction implements IASTMethod
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptMethodDeclaration(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptMethodDeclaration(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
methodCallbacks(requestor);
|
methodCallbacks(requestor);
|
||||||
}
|
}
|
||||||
protected void methodCallbacks(ISourceElementRequestor requestor)
|
protected void methodCallbacks(ISourceElementRequestor requestor)
|
||||||
|
@ -152,7 +159,14 @@ public class ASTMethod extends ASTFunction implements IASTMethod
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterMethodBody(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.enterMethodBody(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
methodCallbacks( requestor );
|
methodCallbacks( requestor );
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -160,7 +174,14 @@ public class ASTMethod extends ASTFunction implements IASTMethod
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitMethodBody( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.exitMethodBody( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTMethod#getConstructorChainInitializers()
|
* @see org.eclipse.cdt.core.parser.ast.IASTMethod#getConstructorChainInitializers()
|
||||||
|
|
|
@ -45,7 +45,14 @@ public class ASTMethodReference
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptMethodReference( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptMethodReference( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class ASTNamespaceAlias extends ASTSymbol implements IASTNamespaceAlias
|
||||||
* @param nameOffset
|
* @param nameOffset
|
||||||
* @param endOffset
|
* @param endOffset
|
||||||
*/
|
*/
|
||||||
public ASTNamespaceAlias(ISymbol s, String alias, IASTNamespaceDefinition namespaceDefinition, int startingOffset, int nameOffset, int endOffset, List references)
|
public ASTNamespaceAlias(ISymbol s, String alias, IASTNamespaceDefinition namespaceDefinition, int startingOffset, int nameOffset, int nameEndOffset, int endOffset, List references)
|
||||||
{
|
{
|
||||||
super( s );
|
super( s );
|
||||||
this.alias = alias;
|
this.alias = alias;
|
||||||
|
@ -44,6 +44,7 @@ public class ASTNamespaceAlias extends ASTSymbol implements IASTNamespaceAlias
|
||||||
setStartingOffset(startingOffset);
|
setStartingOffset(startingOffset);
|
||||||
setEndingOffset(endOffset);
|
setEndingOffset(endOffset);
|
||||||
setNameOffset(nameOffset);
|
setNameOffset(nameOffset);
|
||||||
|
setNameEndOffset(nameEndOffset);
|
||||||
store = new ASTReferenceStore( references);
|
store = new ASTReferenceStore( references);
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -131,4 +132,19 @@ public class ASTNamespaceAlias extends ASTSymbol implements IASTNamespaceAlias
|
||||||
{
|
{
|
||||||
return offsets.getEndingOffset();
|
return offsets.getEndingOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,11 +33,12 @@ public class ASTNamespaceDefinition
|
||||||
* @param startingOffset
|
* @param startingOffset
|
||||||
* @param nameOffset
|
* @param nameOffset
|
||||||
*/
|
*/
|
||||||
public ASTNamespaceDefinition(ISymbol namespaceSymbol, int startingOffset, int nameOffset)
|
public ASTNamespaceDefinition(ISymbol namespaceSymbol, int startingOffset, int nameOffset, int nameEndOffset )
|
||||||
{
|
{
|
||||||
super( namespaceSymbol );
|
super( namespaceSymbol );
|
||||||
setStartingOffset( startingOffset );
|
setStartingOffset( startingOffset );
|
||||||
setNameOffset( nameOffset );
|
setNameOffset( nameOffset );
|
||||||
|
setNameEndOffset( nameEndOffset );
|
||||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), namespaceSymbol.getName() );
|
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), namespaceSymbol.getName() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +110,14 @@ public class ASTNamespaceDefinition
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterNamespaceDefinition( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.enterNamespaceDefinition( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +126,14 @@ public class ASTNamespaceDefinition
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitNamespaceDefinition( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.exitNamespaceDefinition( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -128,4 +143,19 @@ public class ASTNamespaceDefinition
|
||||||
{
|
{
|
||||||
return qualifiedName.getFullyQualifiedName();
|
return qualifiedName.getFullyQualifiedName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return namedOffsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
namedOffsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,14 @@ public class ASTNamespaceReference
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptNamespaceReference( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptNamespaceReference( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class ASTParameterDeclaration extends ASTSymbol implements IASTParameterD
|
||||||
* @param parameterName
|
* @param parameterName
|
||||||
* @param initializerClause
|
* @param initializerClause
|
||||||
*/
|
*/
|
||||||
public ASTParameterDeclaration(ISymbol symbol, boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset)
|
public ASTParameterDeclaration(ISymbol symbol, boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset, int nameEndOffset )
|
||||||
{
|
{
|
||||||
super( symbol );
|
super( symbol );
|
||||||
abstractDeclaration = new ASTAbstractDeclaration( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp );
|
abstractDeclaration = new ASTAbstractDeclaration( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp );
|
||||||
|
@ -49,6 +49,7 @@ public class ASTParameterDeclaration extends ASTSymbol implements IASTParameterD
|
||||||
setStartingOffset(startingOffset);
|
setStartingOffset(startingOffset);
|
||||||
setEndingOffset(endingOffset);
|
setEndingOffset(endingOffset);
|
||||||
setNameOffset(nameOffset);
|
setNameOffset(nameOffset);
|
||||||
|
setNameEndOffset( nameEndOffset );
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration#getName()
|
* @see org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration#getName()
|
||||||
|
@ -178,4 +179,19 @@ public class ASTParameterDeclaration extends ASTSymbol implements IASTParameterD
|
||||||
return offsets.getEndingOffset();
|
return offsets.getEndingOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,14 @@ public class ASTParameterReference extends ASTReference implements IASTParameter
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptParameterReference( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptParameterReference( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class ASTTypedef extends ASTSymbol implements IASTTypedefDeclaration
|
||||||
* @param nameOffset
|
* @param nameOffset
|
||||||
* @param references
|
* @param references
|
||||||
*/
|
*/
|
||||||
public ASTTypedef(ISymbol newSymbol, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, List references)
|
public ASTTypedef(ISymbol newSymbol, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, int nameEndOffset, List references)
|
||||||
{
|
{
|
||||||
super( newSymbol );
|
super( newSymbol );
|
||||||
this.mapping = mapping;
|
this.mapping = mapping;
|
||||||
|
@ -46,6 +46,7 @@ public class ASTTypedef extends ASTSymbol implements IASTTypedefDeclaration
|
||||||
this.qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), newSymbol.getName());
|
this.qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), newSymbol.getName());
|
||||||
setStartingOffset(startingOffset);
|
setStartingOffset(startingOffset);
|
||||||
setNameOffset(nameOffset);
|
setNameOffset(nameOffset);
|
||||||
|
setNameEndOffset( nameEndOffset );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -69,7 +70,14 @@ public class ASTTypedef extends ASTSymbol implements IASTTypedefDeclaration
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptTypedefDeclaration(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptTypedefDeclaration(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
referenceStore.processReferences(requestor);
|
referenceStore.processReferences(requestor);
|
||||||
getAbstractDeclarator().acceptElement( requestor );
|
getAbstractDeclarator().acceptElement( requestor );
|
||||||
}
|
}
|
||||||
|
@ -144,4 +152,19 @@ public class ASTTypedef extends ASTSymbol implements IASTTypedefDeclaration
|
||||||
return qualifiedName.getFullyQualifiedName();
|
return qualifiedName.getFullyQualifiedName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,14 @@ public class ASTTypedefReference
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptTypedefReference(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptTypedefReference(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -98,7 +98,14 @@ public class ASTUsingDeclaration implements IASTUsingDeclaration
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptUsingDeclaration( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptUsingDeclaration( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
delegate.processReferences(requestor);
|
delegate.processReferences(requestor);
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -91,7 +91,14 @@ public class ASTUsingDirective extends ASTAnonymousDeclaration implements IASTUs
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptUsingDirective( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptUsingDirective( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
referenceDelegate.processReferences(requestor);
|
referenceDelegate.processReferences(requestor);
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
||||||
* @param nameOffset
|
* @param nameOffset
|
||||||
* @param references
|
* @param references
|
||||||
*/
|
*/
|
||||||
public ASTVariable(ISymbol newSymbol, IASTAbstractDeclaration abstractDeclaration, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, int startingOffset, int nameOffset, List references, IASTExpression constructorExpression, boolean previouslyDeclared )
|
public ASTVariable(ISymbol newSymbol, IASTAbstractDeclaration abstractDeclaration, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, int startingOffset, int nameOffset, int nameEndOffset, List references, IASTExpression constructorExpression, boolean previouslyDeclared )
|
||||||
{
|
{
|
||||||
super( newSymbol );
|
super( newSymbol );
|
||||||
this.abstractDeclaration = abstractDeclaration;
|
this.abstractDeclaration = abstractDeclaration;
|
||||||
|
@ -55,6 +55,7 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
||||||
this.constructorExpression = constructorExpression;
|
this.constructorExpression = constructorExpression;
|
||||||
setStartingOffset( startingOffset );
|
setStartingOffset( startingOffset );
|
||||||
setNameOffset( nameOffset );
|
setNameOffset( nameOffset );
|
||||||
|
setNameEndOffset(nameEndOffset);
|
||||||
referenceDelegate = new ASTReferenceStore( references );
|
referenceDelegate = new ASTReferenceStore( references );
|
||||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), newSymbol.getName() );
|
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), newSymbol.getName() );
|
||||||
this.previouslyDeclared =previouslyDeclared;
|
this.previouslyDeclared =previouslyDeclared;
|
||||||
|
@ -162,7 +163,14 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptVariable(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptVariable(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
referenceDelegate.processReferences(requestor);
|
referenceDelegate.processReferences(requestor);
|
||||||
if( initializerClause != null )
|
if( initializerClause != null )
|
||||||
initializerClause.acceptElement(requestor);
|
initializerClause.acceptElement(requestor);
|
||||||
|
@ -205,6 +213,7 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
||||||
{
|
{
|
||||||
return offsets.getStartingOffset();
|
return offsets.getStartingOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingOffset()
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingOffset()
|
||||||
*/
|
*/
|
||||||
|
@ -212,6 +221,20 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
||||||
{
|
{
|
||||||
return offsets.getEndingOffset();
|
return offsets.getEndingOffset();
|
||||||
}
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTVariable#getConstructorExpression()
|
* @see org.eclipse.cdt.core.parser.ast.IASTVariable#getConstructorExpression()
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -48,7 +48,14 @@ public class ASTVariableReference
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptVariableReference( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptVariableReference( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -368,7 +368,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
IASTScope scope,
|
IASTScope scope,
|
||||||
String identifier,
|
String identifier,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int nameOffset) throws ASTSemanticException
|
int nameOffset, int nameEndOffset) throws ASTSemanticException
|
||||||
{
|
{
|
||||||
|
|
||||||
IContainerSymbol pstScope = scopeToSymbol(scope);
|
IContainerSymbol pstScope = scopeToSymbol(scope);
|
||||||
|
@ -411,7 +411,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASTNamespaceDefinition namespaceDef = new ASTNamespaceDefinition( namespaceSymbol, startingOffset, nameOffset );
|
ASTNamespaceDefinition namespaceDef = new ASTNamespaceDefinition( namespaceSymbol, startingOffset, nameOffset, nameEndOffset );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
attachSymbolExtension( namespaceSymbol, namespaceDef );
|
attachSymbolExtension( namespaceSymbol, namespaceDef );
|
||||||
|
@ -490,7 +490,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
ClassNameType type,
|
ClassNameType type,
|
||||||
ASTAccessVisibility access,
|
ASTAccessVisibility access,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int nameOffset) throws ASTSemanticException
|
int nameOffset, int nameEndOffset) throws ASTSemanticException
|
||||||
{
|
{
|
||||||
IContainerSymbol currentScopeSymbol = scopeToSymbol(scope);
|
IContainerSymbol currentScopeSymbol = scopeToSymbol(scope);
|
||||||
TypeInfo.eType pstType = classKindToTypeInfo(kind);
|
TypeInfo.eType pstType = classKindToTypeInfo(kind);
|
||||||
|
@ -544,7 +544,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
throw new ASTSemanticException();
|
throw new ASTSemanticException();
|
||||||
}
|
}
|
||||||
|
|
||||||
ASTClassSpecifier classSpecifier = new ASTClassSpecifier( newSymbol, kind, type, access, startingOffset, nameOffset, references );
|
ASTClassSpecifier classSpecifier = new ASTClassSpecifier( newSymbol, kind, type, access, startingOffset, nameOffset, nameEndOffset, references );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
attachSymbolExtension(newSymbol, classSpecifier );
|
attachSymbolExtension(newSymbol, classSpecifier );
|
||||||
|
@ -691,7 +691,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
IASTScope scope,
|
IASTScope scope,
|
||||||
String name,
|
String name,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int nameOffset) throws ASTSemanticException
|
int nameOffset, int nameEndOffset) throws ASTSemanticException
|
||||||
{
|
{
|
||||||
IContainerSymbol containerSymbol = scopeToSymbol(scope);
|
IContainerSymbol containerSymbol = scopeToSymbol(scope);
|
||||||
TypeInfo.eType pstType = TypeInfo.t_enumeration;
|
TypeInfo.eType pstType = TypeInfo.t_enumeration;
|
||||||
|
@ -706,7 +706,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
throw new ASTSemanticException();
|
throw new ASTSemanticException();
|
||||||
}
|
}
|
||||||
|
|
||||||
ASTEnumerationSpecifier enumSpecifier = new ASTEnumerationSpecifier( classSymbol, startingOffset, nameOffset );
|
ASTEnumerationSpecifier enumSpecifier = new ASTEnumerationSpecifier( classSymbol, startingOffset, nameOffset, nameEndOffset );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -725,8 +725,8 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
IASTEnumerationSpecifier enumeration,
|
IASTEnumerationSpecifier enumeration,
|
||||||
String string,
|
String string,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int endingOffset,
|
int nameOffset,
|
||||||
IASTExpression initialValue) throws ASTSemanticException
|
int nameEndOffset, int endingOffset, IASTExpression initialValue) throws ASTSemanticException
|
||||||
{
|
{
|
||||||
IContainerSymbol enumerationSymbol = (IContainerSymbol)((ISymbolOwner)enumeration).getSymbol();
|
IContainerSymbol enumerationSymbol = (IContainerSymbol)((ISymbolOwner)enumeration).getSymbol();
|
||||||
|
|
||||||
|
@ -739,7 +739,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
{
|
{
|
||||||
throw new ASTSemanticException();
|
throw new ASTSemanticException();
|
||||||
}
|
}
|
||||||
ASTEnumerator enumerator = new ASTEnumerator( enumeratorSymbol, enumeration, startingOffset, endingOffset, initialValue );
|
ASTEnumerator enumerator = new ASTEnumerator( enumeratorSymbol, enumeration, startingOffset, nameOffset, nameEndOffset, endingOffset, initialValue );
|
||||||
((ASTEnumerationSpecifier)enumeration).addEnumerator( enumerator );
|
((ASTEnumerationSpecifier)enumeration).addEnumerator( enumerator );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1413,7 +1413,6 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
public IASTFunction createFunction(
|
public IASTFunction createFunction(
|
||||||
IASTScope scope,
|
IASTScope scope,
|
||||||
String name,
|
String name,
|
||||||
int nameEndOffset,
|
|
||||||
List parameters,
|
List parameters,
|
||||||
IASTAbstractDeclaration returnType,
|
IASTAbstractDeclaration returnType,
|
||||||
IASTExceptionSpecification exception,
|
IASTExceptionSpecification exception,
|
||||||
|
@ -1422,6 +1421,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
boolean isStatic,
|
boolean isStatic,
|
||||||
int startOffset,
|
int startOffset,
|
||||||
int nameOffset,
|
int nameOffset,
|
||||||
|
int nameEndOffset,
|
||||||
IASTTemplate ownerTemplate,
|
IASTTemplate ownerTemplate,
|
||||||
boolean isConst,
|
boolean isConst,
|
||||||
boolean isVolatile,
|
boolean isVolatile,
|
||||||
|
@ -1718,7 +1718,6 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
public IASTMethod createMethod(
|
public IASTMethod createMethod(
|
||||||
IASTScope scope,
|
IASTScope scope,
|
||||||
String name,
|
String name,
|
||||||
int nameEndOffset,
|
|
||||||
List parameters,
|
List parameters,
|
||||||
IASTAbstractDeclaration returnType,
|
IASTAbstractDeclaration returnType,
|
||||||
IASTExceptionSpecification exception,
|
IASTExceptionSpecification exception,
|
||||||
|
@ -1727,6 +1726,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
boolean isStatic,
|
boolean isStatic,
|
||||||
int startOffset,
|
int startOffset,
|
||||||
int nameOffset,
|
int nameOffset,
|
||||||
|
int nameEndOffset,
|
||||||
IASTTemplate ownerTemplate,
|
IASTTemplate ownerTemplate,
|
||||||
boolean isConst,
|
boolean isConst,
|
||||||
boolean isVolatile,
|
boolean isVolatile,
|
||||||
|
@ -1881,7 +1881,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
boolean isRegister,
|
boolean isRegister,
|
||||||
boolean isStatic,
|
boolean isStatic,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int nameOffset, IASTExpression constructorExpression) throws ASTSemanticException
|
int nameOffset, int nameEndOffset, IASTExpression constructorExpression) throws ASTSemanticException
|
||||||
{
|
{
|
||||||
List references = new ArrayList();
|
List references = new ArrayList();
|
||||||
IContainerSymbol ownerScope = scopeToSymbol( scope );
|
IContainerSymbol ownerScope = scopeToSymbol( scope );
|
||||||
|
@ -1933,7 +1933,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
){
|
){
|
||||||
IASTScope fieldParentScope = (IASTScope)parentScope.getASTExtension().getPrimaryDeclaration();
|
IASTScope fieldParentScope = (IASTScope)parentScope.getASTExtension().getPrimaryDeclaration();
|
||||||
return createField(fieldParentScope, fieldName,isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern,
|
return createField(fieldParentScope, fieldName,isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern,
|
||||||
isRegister, isStatic, startingOffset, offset, constructorExpression, ASTAccessVisibility.PRIVATE, references);
|
isRegister, isStatic, startingOffset, offset, nameEndOffset, constructorExpression, ASTAccessVisibility.PRIVATE, references);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1968,7 +1968,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
}
|
}
|
||||||
|
|
||||||
ASTVariable variable = new ASTVariable( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, references, constructorExpression, previouslyDeclared );
|
ASTVariable variable = new ASTVariable( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, nameEndOffset, references, constructorExpression, previouslyDeclared );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
attachSymbolExtension(newSymbol, variable );
|
attachSymbolExtension(newSymbol, variable );
|
||||||
|
@ -2041,10 +2041,10 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
boolean isStatic,
|
boolean isStatic,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int nameOffset,
|
int nameOffset,
|
||||||
IASTExpression constructorExpression, ASTAccessVisibility visibility) throws ASTSemanticException
|
int nameEndOffset, IASTExpression constructorExpression, ASTAccessVisibility visibility) throws ASTSemanticException
|
||||||
{
|
{
|
||||||
return createField(scope, name,isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern,
|
return createField(scope, name,isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern,
|
||||||
isRegister, isStatic, startingOffset, nameOffset, constructorExpression, visibility, null);
|
isRegister, isStatic, startingOffset, nameOffset, nameEndOffset, constructorExpression, visibility, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IASTField createField(
|
public IASTField createField(
|
||||||
|
@ -2060,6 +2060,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
boolean isStatic,
|
boolean isStatic,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int nameOffset,
|
int nameOffset,
|
||||||
|
int nameEndOffset,
|
||||||
IASTExpression constructorExpression,
|
IASTExpression constructorExpression,
|
||||||
ASTAccessVisibility visibility,
|
ASTAccessVisibility visibility,
|
||||||
List references) throws ASTSemanticException
|
List references) throws ASTSemanticException
|
||||||
|
@ -2104,7 +2105,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
throw new ASTSemanticException();
|
throw new ASTSemanticException();
|
||||||
}
|
}
|
||||||
|
|
||||||
ASTField field = new ASTField( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, references, previouslyDeclared, constructorExpression, visibility );
|
ASTField field = new ASTField( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, nameEndOffset, references, previouslyDeclared, constructorExpression, visibility );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
attachSymbolExtension(newSymbol, field );
|
attachSymbolExtension(newSymbol, field );
|
||||||
|
@ -2171,7 +2172,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
String name,
|
String name,
|
||||||
IASTAbstractDeclaration mapping,
|
IASTAbstractDeclaration mapping,
|
||||||
int startingOffset,
|
int startingOffset,
|
||||||
int nameOffset) throws ASTSemanticException
|
int nameOffset, int nameEndOffset) throws ASTSemanticException
|
||||||
{
|
{
|
||||||
IContainerSymbol containerSymbol = scopeToSymbol(scope);
|
IContainerSymbol containerSymbol = scopeToSymbol(scope);
|
||||||
ISymbol newSymbol = pst.newSymbol( name, TypeInfo.t_type);
|
ISymbol newSymbol = pst.newSymbol( name, TypeInfo.t_type);
|
||||||
|
@ -2192,7 +2193,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
{
|
{
|
||||||
throw new ASTSemanticException();
|
throw new ASTSemanticException();
|
||||||
}
|
}
|
||||||
ASTTypedef d = new ASTTypedef( newSymbol, mapping, startingOffset, nameOffset, references );
|
ASTTypedef d = new ASTTypedef( newSymbol, mapping, startingOffset, nameOffset, nameEndOffset, references );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
attachSymbolExtension(newSymbol, d );
|
attachSymbolExtension(newSymbol, d );
|
||||||
|
@ -2260,7 +2261,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
}
|
}
|
||||||
|
|
||||||
ASTElaboratedTypeSpecifier elab =
|
ASTElaboratedTypeSpecifier elab =
|
||||||
new ASTElaboratedTypeSpecifier( checkSymbol, kind, startingOffset, name.getFirstToken().getOffset(), endOffset, references, isForewardDecl );
|
new ASTElaboratedTypeSpecifier( checkSymbol, kind, startingOffset, name.getFirstToken().getOffset(), name.getLastToken().getEndOffset(), endOffset, references, isForewardDecl );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -2279,7 +2280,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
checkSymbol.getASTExtension().getPrimaryDeclaration() instanceof IASTEnumerationSpecifier
|
checkSymbol.getASTExtension().getPrimaryDeclaration() instanceof IASTEnumerationSpecifier
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ASTElaboratedTypeSpecifier elab = new ASTElaboratedTypeSpecifier( checkSymbol, kind, startingOffset, name.getFirstToken().getOffset(), endOffset, references, isForewardDecl );
|
ASTElaboratedTypeSpecifier elab = new ASTElaboratedTypeSpecifier( checkSymbol, kind, startingOffset, name.getFirstToken().getOffset(), name.getLastToken().getEndOffset(), endOffset, references, isForewardDecl );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
attachSymbolExtension( checkSymbol, elab );
|
attachSymbolExtension( checkSymbol, elab );
|
||||||
|
@ -2304,7 +2305,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createNamespaceAlias(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ITokenDuple, int, int, int)
|
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createNamespaceAlias(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ITokenDuple, int, int, int)
|
||||||
*/
|
*/
|
||||||
public IASTNamespaceAlias createNamespaceAlias(IASTScope scope, String identifier, ITokenDuple alias, int startingOffset, int nameOffset, int endOffset) throws ASTSemanticException
|
public IASTNamespaceAlias createNamespaceAlias(IASTScope scope, String identifier, ITokenDuple alias, int startingOffset, int nameOffset, int nameEndOffset, int endOffset) throws ASTSemanticException
|
||||||
{
|
{
|
||||||
IContainerSymbol startingSymbol = scopeToSymbol(scope);
|
IContainerSymbol startingSymbol = scopeToSymbol(scope);
|
||||||
List references = new ArrayList();
|
List references = new ArrayList();
|
||||||
|
@ -2328,7 +2329,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
|
|
||||||
ASTNamespaceAlias astAlias = new ASTNamespaceAlias(
|
ASTNamespaceAlias astAlias = new ASTNamespaceAlias(
|
||||||
newSymbol, alias.toString(), (IASTNamespaceDefinition)namespaceSymbol.getASTExtension().getPrimaryDeclaration(),
|
newSymbol, alias.toString(), (IASTNamespaceDefinition)namespaceSymbol.getASTExtension().getPrimaryDeclaration(),
|
||||||
startingOffset, nameOffset, endOffset, references );
|
startingOffset, nameOffset, nameEndOffset, endOffset, references );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
attachSymbolExtension( newSymbol, astAlias );
|
attachSymbolExtension( newSymbol, astAlias );
|
||||||
|
@ -2380,9 +2381,9 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IASTParameterDeclaration createParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset)
|
public IASTParameterDeclaration createParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset)
|
||||||
{
|
{
|
||||||
return new ASTParameterDeclaration( null, isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp, parameterName, initializerClause, startingOffset, endingOffset, nameOffset );
|
return new ASTParameterDeclaration( null, isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp, parameterName, initializerClause, startingOffset, endingOffset, nameOffset, nameEndOffset );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -73,7 +73,14 @@ public class ASTASMDefinition
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptASMDefinition(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptASMDefinition(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -91,7 +91,14 @@ public class ASTAbstractTypeSpecifierDeclaration
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptAbstractTypeSpecDeclaration(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptAbstractTypeSpecDeclaration(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -34,6 +34,9 @@ public class ASTClassSpecifier extends ASTScopedTypeSpecifier implements IASTQCl
|
||||||
String name,
|
String name,
|
||||||
ASTClassKind kind,
|
ASTClassKind kind,
|
||||||
ClassNameType type,
|
ClassNameType type,
|
||||||
|
int startingOffset,
|
||||||
|
int nameOffset,
|
||||||
|
int nameEndOffset,
|
||||||
ASTAccessVisibility access)
|
ASTAccessVisibility access)
|
||||||
{
|
{
|
||||||
super( scope, name );
|
super( scope, name );
|
||||||
|
@ -41,6 +44,9 @@ public class ASTClassSpecifier extends ASTScopedTypeSpecifier implements IASTQCl
|
||||||
qualifiedNameElement = new ASTQualifiedNamedElement( scope, name );
|
qualifiedNameElement = new ASTQualifiedNamedElement( scope, name );
|
||||||
classNameType = type;
|
classNameType = type;
|
||||||
classKind = kind;
|
classKind = kind;
|
||||||
|
offsets.setStartingOffset(startingOffset);
|
||||||
|
offsets.setNameOffset(nameOffset);
|
||||||
|
offsets.setNameEndOffset(nameEndOffset);
|
||||||
this.access = access;
|
this.access = access;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
@ -171,14 +177,42 @@ public class ASTClassSpecifier extends ASTScopedTypeSpecifier implements IASTQCl
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterClassSpecifier(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.enterClassSpecifier(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exit(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exit(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitClassSpecifier(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.exitClassSpecifier(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,14 @@ public class ASTCompilationUnit implements IASTCompilationUnit, IASTQScope {
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterCompilationUnit(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.enterCompilationUnit(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -57,7 +64,14 @@ public class ASTCompilationUnit implements IASTCompilationUnit, IASTQScope {
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitCompilationUnit(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.exitCompilationUnit(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,12 +35,13 @@ public class ASTElaboratedTypeSpecifier implements IASTElaboratedTypeSpecifier
|
||||||
* @param startingOffset
|
* @param startingOffset
|
||||||
* @param endOffset
|
* @param endOffset
|
||||||
*/
|
*/
|
||||||
public ASTElaboratedTypeSpecifier(IASTScope scope, ASTClassKind elaboratedClassKind, String typeName, int startingOffset, int nameOffset, int endOffset)
|
public ASTElaboratedTypeSpecifier(IASTScope scope, ASTClassKind elaboratedClassKind, String typeName, int startingOffset, int nameOffset, int nameEndOffset, int endOffset)
|
||||||
{
|
{
|
||||||
classKind = elaboratedClassKind;
|
classKind = elaboratedClassKind;
|
||||||
this.typeName = typeName;
|
this.typeName = typeName;
|
||||||
setStartingOffset( startingOffset );
|
setStartingOffset( startingOffset );
|
||||||
setNameOffset( nameOffset );
|
setNameOffset( nameOffset );
|
||||||
|
setNameEndOffset( nameEndOffset );
|
||||||
setEndingOffset( endOffset );
|
setEndingOffset( endOffset );
|
||||||
qualifiedName = new ASTQualifiedNamedElement( scope, typeName );
|
qualifiedName = new ASTQualifiedNamedElement( scope, typeName );
|
||||||
}
|
}
|
||||||
|
@ -106,7 +107,14 @@ public class ASTElaboratedTypeSpecifier implements IASTElaboratedTypeSpecifier
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptElaboratedForewardDeclaration(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptElaboratedForewardDeclaration(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enterScope(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
@ -132,4 +140,19 @@ public class ASTElaboratedTypeSpecifier implements IASTElaboratedTypeSpecifier
|
||||||
public void setNameOffset(int o) {
|
public void setNameOffset(int o) {
|
||||||
offsets.setNameOffset(o);
|
offsets.setNameOffset(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,12 +36,13 @@ public class ASTEnumerationSpecifier extends ASTScopedTypeSpecifier
|
||||||
* @param name
|
* @param name
|
||||||
* @param startingOffset
|
* @param startingOffset
|
||||||
*/
|
*/
|
||||||
public ASTEnumerationSpecifier(IASTScope scope, String name, int startingOffset, int nameOffset)
|
public ASTEnumerationSpecifier(IASTScope scope, String name, int startingOffset, int nameOffset, int nameEndOffset )
|
||||||
{
|
{
|
||||||
super( scope, name );
|
super( scope, name );
|
||||||
this.name = name;
|
this.name = name;
|
||||||
offsets.setNameOffset( nameOffset );
|
offsets.setNameOffset( nameOffset );
|
||||||
offsets.setStartingOffset( startingOffset);
|
offsets.setStartingOffset( startingOffset);
|
||||||
|
setNameEndOffset(nameEndOffset);
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getName()
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getName()
|
||||||
|
@ -111,7 +112,14 @@ public class ASTEnumerationSpecifier extends ASTScopedTypeSpecifier
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptEnumerationSpecifier(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptEnumerationSpecifier(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
@ -125,4 +133,19 @@ public class ASTEnumerationSpecifier extends ASTScopedTypeSpecifier
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,12 +35,13 @@ public class ASTEnumerator
|
||||||
* @param startingOffset
|
* @param startingOffset
|
||||||
* @param endingOffset
|
* @param endingOffset
|
||||||
*/
|
*/
|
||||||
public ASTEnumerator(IASTEnumerationSpecifier enumeration, String string, int startingOffset, int endingOffset, IASTExpression initialValue)
|
public ASTEnumerator(IASTEnumerationSpecifier enumeration, String string, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset, IASTExpression initialValue)
|
||||||
{
|
{
|
||||||
this.enumeration = enumeration;
|
this.enumeration = enumeration;
|
||||||
name = string;
|
name = string;
|
||||||
offsets.setStartingOffset( startingOffset );
|
offsets.setStartingOffset( startingOffset );
|
||||||
offsets.setNameOffset( startingOffset );
|
offsets.setNameOffset( nameOffset );
|
||||||
|
offsets.setNameEndOffset( nameEndOffset );
|
||||||
offsets.setEndingOffset( endingOffset );
|
offsets.setEndingOffset( endingOffset );
|
||||||
this.initialValue = initialValue;
|
this.initialValue = initialValue;
|
||||||
}
|
}
|
||||||
|
@ -125,4 +126,20 @@ public class ASTEnumerator
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class ASTField extends ASTVariable implements IASTField
|
||||||
* @param isRegister
|
* @param isRegister
|
||||||
* @param isStatic
|
* @param isStatic
|
||||||
*/
|
*/
|
||||||
public ASTField(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
public ASTField(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, ASTAccessVisibility visibility)
|
||||||
{
|
{
|
||||||
super(
|
super(
|
||||||
scope,
|
scope,
|
||||||
|
@ -50,7 +50,7 @@ public class ASTField extends ASTVariable implements IASTField
|
||||||
isMutable,
|
isMutable,
|
||||||
isExtern,
|
isExtern,
|
||||||
isRegister,
|
isRegister,
|
||||||
isStatic, startingOffset, nameOffset, constructorExpression );
|
isStatic, startingOffset, nameOffset, nameEndOffset, constructorExpression );
|
||||||
this.visibility = visibility;
|
this.visibility = visibility;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,14 @@ public class ASTField extends ASTVariable implements IASTField
|
||||||
|
|
||||||
public void acceptElement( ISourceElementRequestor requestor )
|
public void acceptElement( ISourceElementRequestor requestor )
|
||||||
{
|
{
|
||||||
requestor.acceptField( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptField( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enterScope( ISourceElementRequestor requestor )
|
public void enterScope( ISourceElementRequestor requestor )
|
||||||
|
|
|
@ -51,10 +51,10 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
||||||
offsets.setStartingOffset( startOffset );
|
offsets.setStartingOffset( startOffset );
|
||||||
offsets.setNameOffset( nameOffset );
|
offsets.setNameOffset( nameOffset );
|
||||||
qualifiedName = new ASTQualifiedNamedElement( scope, name );
|
qualifiedName = new ASTQualifiedNamedElement( scope, name );
|
||||||
this.nameEndOffset = nameEndOffset;
|
setNameEndOffset(nameEndOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final int nameEndOffset;
|
private boolean previouslyDeclared;
|
||||||
private boolean hasFunctionBody = false;
|
private boolean hasFunctionBody = false;
|
||||||
private final IASTQualifiedNameElement qualifiedName;
|
private final IASTQualifiedNameElement qualifiedName;
|
||||||
private final IASTTemplate ownerTemplateDeclaration;
|
private final IASTTemplate ownerTemplateDeclaration;
|
||||||
|
@ -184,14 +184,28 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptFunctionDeclaration(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptFunctionDeclaration(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterFunctionBody( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.enterFunctionBody( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -199,7 +213,14 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitFunctionBody( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.exitFunctionBody( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTFunction#setHasFunctionBody(boolean)
|
* @see org.eclipse.cdt.core.parser.ast.IASTFunction#setHasFunctionBody(boolean)
|
||||||
|
@ -225,14 +246,19 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
||||||
*/
|
*/
|
||||||
public boolean previouslyDeclared()
|
public boolean previouslyDeclared()
|
||||||
{
|
{
|
||||||
// TODO Auto-generated method stub
|
return previouslyDeclared;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTFunction#getNameEndOffset()
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
*/
|
*/
|
||||||
public int getNameEndOffset()
|
public int getNameEndOffset()
|
||||||
{
|
{
|
||||||
return nameEndOffset;
|
return offsets.getNameEndOffset();
|
||||||
}
|
}
|
||||||
}
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}}
|
||||||
|
|
|
@ -101,7 +101,14 @@ public class ASTLinkageSpecification
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterLinkageSpecification(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.enterLinkageSpecification(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -109,7 +116,14 @@ public class ASTLinkageSpecification
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitLinkageSpecification(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.exitLinkageSpecification(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,17 +167,38 @@ public class ASTMethod extends ASTFunction implements IASTMethod
|
||||||
|
|
||||||
public void acceptElement( ISourceElementRequestor requestor )
|
public void acceptElement( ISourceElementRequestor requestor )
|
||||||
{
|
{
|
||||||
requestor.acceptMethodDeclaration( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptMethodDeclaration( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enterScope( ISourceElementRequestor requestor )
|
public void enterScope( ISourceElementRequestor requestor )
|
||||||
{
|
{
|
||||||
requestor.enterMethodBody(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.enterMethodBody(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void exitScope( ISourceElementRequestor requestor )
|
public void exitScope( ISourceElementRequestor requestor )
|
||||||
{
|
{
|
||||||
requestor.exitMethodBody(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.exitMethodBody(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTMethod#getConstructorChainInitializers()
|
* @see org.eclipse.cdt.core.parser.ast.IASTMethod#getConstructorChainInitializers()
|
||||||
|
|
|
@ -35,11 +35,12 @@ public class ASTNamespaceAlias extends ASTDeclaration implements IASTNamespaceAl
|
||||||
* @param nameOffset
|
* @param nameOffset
|
||||||
* @param endOffset
|
* @param endOffset
|
||||||
*/
|
*/
|
||||||
public ASTNamespaceAlias(IASTScope scope, String identifier, String string, int startingOffset, int nameOffset, int endOffset)
|
public ASTNamespaceAlias(IASTScope scope, String identifier, String string, int startingOffset, int nameOffset, int nameEndOffset, int endOffset)
|
||||||
{
|
{
|
||||||
super( scope );
|
super( scope );
|
||||||
setStartingOffset(startingOffset);
|
setStartingOffset(startingOffset);
|
||||||
setNameOffset(nameOffset);
|
setNameOffset(nameOffset);
|
||||||
|
setNameEndOffset( nameEndOffset );
|
||||||
setEndingOffset(endOffset);
|
setEndingOffset(endOffset);
|
||||||
this.identifier = identifier;
|
this.identifier = identifier;
|
||||||
this.alias = string;
|
this.alias = string;
|
||||||
|
@ -129,4 +130,19 @@ public class ASTNamespaceAlias extends ASTDeclaration implements IASTNamespaceAl
|
||||||
{
|
{
|
||||||
return offsets.getEndingOffset();
|
return offsets.getEndingOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,11 +31,14 @@ public class ASTNamespaceDefinition extends ASTDeclaration implements IASTNamesp
|
||||||
private NamedOffsets offsets = new NamedOffsets();
|
private NamedOffsets offsets = new NamedOffsets();
|
||||||
private final ASTQualifiedNamedElement qualifiedNameElement;
|
private final ASTQualifiedNamedElement qualifiedNameElement;
|
||||||
|
|
||||||
public ASTNamespaceDefinition( IASTScope scope, String name )
|
public ASTNamespaceDefinition( IASTScope scope, String name, int startOffset, int nameOffset, int nameEndOffset )
|
||||||
{
|
{
|
||||||
super( scope );
|
super( scope );
|
||||||
qualifiedNameElement = new ASTQualifiedNamedElement( scope, name );
|
qualifiedNameElement = new ASTQualifiedNamedElement( scope, name );
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
setStartingOffset(startOffset);
|
||||||
|
setNameOffset(nameOffset);
|
||||||
|
setNameEndOffset(nameEndOffset);
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getName()
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getName()
|
||||||
|
@ -118,13 +121,42 @@ public class ASTNamespaceDefinition extends ASTDeclaration implements IASTNamesp
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterNamespaceDefinition(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.enterNamespaceDefinition(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exit(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#exit(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitNamespaceDefinition(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.exitNamespaceDefinition(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class ASTParameterDeclaration extends ASTAbstractDeclaration implements I
|
||||||
* @param parameterName
|
* @param parameterName
|
||||||
* @param initializerClause
|
* @param initializerClause
|
||||||
*/
|
*/
|
||||||
public ASTParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset)
|
public ASTParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset, int nameEndOffset )
|
||||||
{
|
{
|
||||||
super( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp );
|
super( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp );
|
||||||
this.parameterName = parameterName;
|
this.parameterName = parameterName;
|
||||||
|
@ -44,6 +44,7 @@ public class ASTParameterDeclaration extends ASTAbstractDeclaration implements I
|
||||||
setStartingOffset( startingOffset );
|
setStartingOffset( startingOffset );
|
||||||
setEndingOffset( endingOffset );
|
setEndingOffset( endingOffset );
|
||||||
setNameOffset( nameOffset );
|
setNameOffset( nameOffset );
|
||||||
|
setNameEndOffset(nameEndOffset);
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration#getName()
|
* @see org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration#getName()
|
||||||
|
@ -102,4 +103,19 @@ public class ASTParameterDeclaration extends ASTAbstractDeclaration implements I
|
||||||
{
|
{
|
||||||
return offsets.getEndingOffset();
|
return offsets.getEndingOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,14 @@ public class ASTTemplateDeclaration extends ASTDeclaration implements IASTTempla
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterTemplateDeclaration(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.enterTemplateDeclaration(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -120,6 +127,13 @@ public class ASTTemplateDeclaration extends ASTDeclaration implements IASTTempla
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitTemplateDeclaration(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.exitTemplateDeclaration(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,14 @@ public class ASTTemplateInstantiation extends ASTDeclaration implements IASTTemp
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterTemplateInstantiation(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.enterTemplateInstantiation(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,6 +110,13 @@ public class ASTTemplateInstantiation extends ASTDeclaration implements IASTTemp
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitTemplateExplicitInstantiation(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.exitTemplateExplicitInstantiation(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,14 @@ public class ASTTemplateSpecialization extends ASTDeclaration implements IASTTem
|
||||||
*/
|
*/
|
||||||
public void enterScope(ISourceElementRequestor requestor)
|
public void enterScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.enterTemplateSpecialization(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.enterTemplateSpecialization(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -97,6 +104,13 @@ public class ASTTemplateSpecialization extends ASTDeclaration implements IASTTem
|
||||||
*/
|
*/
|
||||||
public void exitScope(ISourceElementRequestor requestor)
|
public void exitScope(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.exitTemplateSpecialization(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.exitTemplateSpecialization(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,13 +32,14 @@ public class ASTTypedefDeclaration extends ASTDeclaration implements IASTTypedef
|
||||||
* @param name
|
* @param name
|
||||||
* @param mapping
|
* @param mapping
|
||||||
*/
|
*/
|
||||||
public ASTTypedefDeclaration(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset)
|
public ASTTypedefDeclaration(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, int nameEndOffset )
|
||||||
{
|
{
|
||||||
super( scope );
|
super( scope );
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.mapping = mapping;
|
this.mapping = mapping;
|
||||||
setStartingOffset(startingOffset);
|
setStartingOffset(startingOffset);
|
||||||
setNameOffset(nameOffset);
|
setNameOffset(nameOffset);
|
||||||
|
setNameEndOffset(nameEndOffset);
|
||||||
qualifiedName = new ASTQualifiedNamedElement( scope, name );
|
qualifiedName = new ASTQualifiedNamedElement( scope, name );
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -110,7 +111,14 @@ public class ASTTypedefDeclaration extends ASTDeclaration implements IASTTypedef
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptTypedefDeclaration(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptTypedefDeclaration(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
@ -125,4 +133,19 @@ public class ASTTypedefDeclaration extends ASTDeclaration implements IASTTypedef
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,14 @@ public class ASTUsingDeclaration
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptUsingDeclaration(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptUsingDeclaration(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -76,7 +76,14 @@ public class ASTUsingDirective
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptUsingDirective(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptUsingDirective(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class ASTVariable extends ASTDeclaration implements IASTVariable
|
||||||
* @param scope
|
* @param scope
|
||||||
*/
|
*/
|
||||||
public ASTVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression,
|
public ASTVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression,
|
||||||
IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, IASTExpression constructorExpression )
|
IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, int nameEndOffset, IASTExpression constructorExpression )
|
||||||
{
|
{
|
||||||
super(scope);
|
super(scope);
|
||||||
this.isAuto = isAuto;
|
this.isAuto = isAuto;
|
||||||
|
@ -57,6 +57,7 @@ public class ASTVariable extends ASTDeclaration implements IASTVariable
|
||||||
qualifiedName = new ASTQualifiedNamedElement( scope, name );
|
qualifiedName = new ASTQualifiedNamedElement( scope, name );
|
||||||
setStartingOffset(startingOffset);
|
setStartingOffset(startingOffset);
|
||||||
setNameOffset(nameOffset);
|
setNameOffset(nameOffset);
|
||||||
|
setNameEndOffset( nameEndOffset );
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTVariable#isAuto()
|
* @see org.eclipse.cdt.core.parser.ast.IASTVariable#isAuto()
|
||||||
|
@ -182,7 +183,14 @@ public class ASTVariable extends ASTDeclaration implements IASTVariable
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptVariable(this);
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptVariable(this);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#enter(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||||
|
@ -204,5 +212,19 @@ public class ASTVariable extends ASTDeclaration implements IASTVariable
|
||||||
return constructorExpression;
|
return constructorExpression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameEndOffset()
|
||||||
|
*/
|
||||||
|
public int getNameEndOffset()
|
||||||
|
{
|
||||||
|
return offsets.getNameEndOffset();
|
||||||
|
}
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||||
|
*/
|
||||||
|
public void setNameEndOffset(int o)
|
||||||
|
{
|
||||||
|
offsets.setNameEndOffset(o);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,10 +85,8 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createNamespaceDefinition(int, java.lang.String, int)
|
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createNamespaceDefinition(int, java.lang.String, int)
|
||||||
*/
|
*/
|
||||||
public IASTNamespaceDefinition createNamespaceDefinition(IASTScope scope, String identifier, int first, int nameOffset) {
|
public IASTNamespaceDefinition createNamespaceDefinition(IASTScope scope, String identifier, int first, int nameOffset, int nameEndOffset) {
|
||||||
IASTNamespaceDefinition definition = new ASTNamespaceDefinition( scope, identifier );
|
IASTNamespaceDefinition definition = new ASTNamespaceDefinition( scope, identifier, first, nameOffset, nameEndOffset );
|
||||||
definition.setStartingOffset( first );
|
|
||||||
definition.setNameOffset( nameOffset );
|
|
||||||
return definition;
|
return definition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,11 +114,8 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createClassSpecifier(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ast.ClassKind, org.eclipse.cdt.core.parser.ast.ClassNameType, org.eclipse.cdt.core.parser.ast.AccessVisibility, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
|
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createClassSpecifier(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ast.ClassKind, org.eclipse.cdt.core.parser.ast.ClassNameType, org.eclipse.cdt.core.parser.ast.AccessVisibility, org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
|
||||||
*/
|
*/
|
||||||
public IASTClassSpecifier createClassSpecifier(IASTScope scope, ITokenDuple name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int nameOffset) throws ASTSemanticException {
|
public IASTClassSpecifier createClassSpecifier(IASTScope scope, ITokenDuple name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int nameOffset, int nameEndOffset ) throws ASTSemanticException {
|
||||||
IASTClassSpecifier spec = new ASTClassSpecifier( scope, name == null ? "" : name.toString() , kind, type, access );
|
return new ASTClassSpecifier( scope, name == null ? "" : name.toString() , kind, type, startingOffset, nameOffset, nameEndOffset, access );
|
||||||
spec.setStartingOffset( startingOffset );
|
|
||||||
spec.setNameOffset( nameOffset );
|
|
||||||
return spec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -134,17 +129,17 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createEnumerationSpecifier(java.lang.String, int)
|
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createEnumerationSpecifier(java.lang.String, int)
|
||||||
*/
|
*/
|
||||||
public IASTEnumerationSpecifier createEnumerationSpecifier(IASTScope scope, String name, int startingOffset, int nameOffset)
|
public IASTEnumerationSpecifier createEnumerationSpecifier(IASTScope scope, String name, int startingOffset, int nameOffset, int nameEndOffset)
|
||||||
{
|
{
|
||||||
return new ASTEnumerationSpecifier( scope, name, startingOffset, nameOffset );
|
return new ASTEnumerationSpecifier( scope, name, startingOffset, nameOffset, nameEndOffset );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#addEnumerator(org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier, java.lang.String, int, int)
|
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#addEnumerator(org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier, java.lang.String, int, int)
|
||||||
*/
|
*/
|
||||||
public void addEnumerator(IASTEnumerationSpecifier enumeration, String string, int startingOffset, int endingOffset, IASTExpression initialValue)
|
public void addEnumerator(IASTEnumerationSpecifier enumeration, String string, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset, IASTExpression initialValue)
|
||||||
{
|
{
|
||||||
IASTEnumerator enumerator = new ASTEnumerator( enumeration, string, startingOffset, endingOffset, initialValue );
|
IASTEnumerator enumerator = new ASTEnumerator( enumeration, string, startingOffset, nameOffset, nameEndOffset, endingOffset, initialValue );
|
||||||
((ASTEnumerationSpecifier)enumeration).addEnumerator( enumerator );
|
((ASTEnumerationSpecifier)enumeration).addEnumerator( enumerator );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +184,7 @@ 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, String name, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, List constructorChain, boolean isFunctionDefinition )
|
public IASTFunction createFunction(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, List constructorChain, boolean isFunctionDefinition )
|
||||||
{
|
{
|
||||||
return new ASTFunction(scope, name, nameEndOffset, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate );
|
return new ASTFunction(scope, name, nameEndOffset, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate );
|
||||||
}
|
}
|
||||||
|
@ -197,7 +192,7 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
||||||
/* (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, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isFunctionDefinition )
|
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 )
|
||||||
{
|
{
|
||||||
return new ASTMethod(scope, name, nameEndOffset, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate, isConst, isVolatile, false, false, isVirtual, isExplicit, isPureVirtual, visibility, constructorChain);
|
return new ASTMethod(scope, name, nameEndOffset, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate, isConst, isVolatile, false, false, isVirtual, isExplicit, isPureVirtual, visibility, constructorChain);
|
||||||
}
|
}
|
||||||
|
@ -205,17 +200,17 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createVariable(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, boolean, org.eclipse.cdt.core.parser.ast.IASTInitializerClause, org.eclipse.cdt.core.parser.ast.IASTExpression, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, boolean, boolean, boolean, boolean)
|
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createVariable(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, boolean, org.eclipse.cdt.core.parser.ast.IASTInitializerClause, org.eclipse.cdt.core.parser.ast.IASTExpression, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, boolean, boolean, boolean, boolean)
|
||||||
*/
|
*/
|
||||||
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, IASTExpression constructorExpression)
|
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)
|
||||||
{
|
{
|
||||||
return new ASTVariable(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, nameOffset, constructorExpression);
|
return new ASTVariable(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, nameOffset, nameEndOffset, constructorExpression);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createField(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, boolean, org.eclipse.cdt.core.parser.ast.IASTInitializerClause, org.eclipse.cdt.core.parser.ast.IASTExpression, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, boolean, boolean, boolean, boolean, org.eclipse.cdt.core.parser.ast.ASTAccessVisibility)
|
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createField(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, boolean, org.eclipse.cdt.core.parser.ast.IASTInitializerClause, org.eclipse.cdt.core.parser.ast.IASTExpression, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration, boolean, boolean, boolean, boolean, org.eclipse.cdt.core.parser.ast.ASTAccessVisibility)
|
||||||
*/
|
*/
|
||||||
public IASTField createField(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
public IASTField createField(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, ASTAccessVisibility visibility)
|
||||||
{
|
{
|
||||||
return new ASTField(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, nameOffset, constructorExpression, visibility);
|
return new ASTField(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, nameOffset, nameEndOffset, constructorExpression, visibility);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -253,9 +248,9 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTypedef(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration)
|
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTypedef(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ast.IASTAbstractDeclaration)
|
||||||
*/
|
*/
|
||||||
public IASTTypedefDeclaration createTypedef(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset)
|
public IASTTypedefDeclaration createTypedef(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, int nameEndOffset)
|
||||||
{
|
{
|
||||||
return new ASTTypedefDeclaration( scope, name, mapping, startingOffset, nameOffset );
|
return new ASTTypedefDeclaration( scope, name, mapping, startingOffset, nameOffset, nameEndOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -268,15 +263,15 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
||||||
|
|
||||||
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(IASTScope scope, ASTClassKind elaboratedClassKind, ITokenDuple typeName, int startingOffset, int endOffset, boolean isForewardDecl)
|
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(IASTScope scope, ASTClassKind elaboratedClassKind, ITokenDuple typeName, int startingOffset, int endOffset, boolean isForewardDecl)
|
||||||
{
|
{
|
||||||
return new ASTElaboratedTypeSpecifier( scope, elaboratedClassKind, typeName.toString(), startingOffset, typeName.getFirstToken().getOffset(), endOffset );
|
return new ASTElaboratedTypeSpecifier( scope, elaboratedClassKind, typeName.toString(), startingOffset, typeName.getFirstToken().getOffset(), typeName.getLastToken().getEndOffset(), endOffset );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createNamespaceAlias(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ITokenDuple, int, int, int)
|
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createNamespaceAlias(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, org.eclipse.cdt.core.parser.ITokenDuple, int, int, int)
|
||||||
*/
|
*/
|
||||||
public IASTNamespaceAlias createNamespaceAlias(IASTScope scope, String identifier, ITokenDuple alias, int startingOffset, int nameOffset, int endOffset)
|
public IASTNamespaceAlias createNamespaceAlias(IASTScope scope, String identifier, ITokenDuple alias, int startingOffset, int nameOffset, int nameEndOffset, int endOffset)
|
||||||
{
|
{
|
||||||
return new ASTNamespaceAlias( scope, identifier, alias.toString(), startingOffset, nameOffset, endOffset );
|
return new ASTNamespaceAlias( scope, identifier, alias.toString(), startingOffset, nameOffset, nameEndOffset, endOffset );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -293,9 +288,9 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
||||||
return true; // we have no information to say that it is not
|
return true; // we have no information to say that it is not
|
||||||
}
|
}
|
||||||
|
|
||||||
public IASTParameterDeclaration createParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int endingOffset, int nameOffset)
|
public IASTParameterDeclaration createParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset)
|
||||||
{
|
{
|
||||||
return new ASTParameterDeclaration( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp, parameterName, initializerClause, startingOffset, endingOffset, nameOffset );
|
return new ASTParameterDeclaration( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp, parameterName, initializerClause, startingOffset, endingOffset, nameOffset, nameEndOffset );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -253,7 +253,14 @@ public class DefaultProblem implements IProblem {
|
||||||
*/
|
*/
|
||||||
public void acceptElement(ISourceElementRequestor requestor)
|
public void acceptElement(ISourceElementRequestor requestor)
|
||||||
{
|
{
|
||||||
requestor.acceptProblem( this );
|
try
|
||||||
|
{
|
||||||
|
requestor.acceptProblem( this );
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue