mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
org.eclipse.cdt.core
Parser updates: Added IToken.getLineNumber() to facilitate adding line numbers to AST. Added line number support into IASTOffsetableElement. Updated all implementations to use this. Updated Parser and IASTFactory to populate IASTOffsetableElement with the values retrieved from IToken. Removed IScanner.getLineNumberForOffset(). Model updates: Updated CModelBuilder to access line number information from IASTOffsetableElement. org.eclipse.cdt.core.tests Updated ParserSymbolTableTest to accommodate new constructors for COMPLETE_PARSE ASTNodes (line # info). Updated CModelElementsTest to enable testing for line numbers. Removed CModelElementsFailedTests.testBug36379() as it is redundant due to CModelElementTests.testCModelElements() is complete. Removed CModelElementsFailedTests from AutomatedIntegrationSuite as it is empty.
This commit is contained in:
parent
8104889038
commit
a38f5c4f0d
65 changed files with 1342 additions and 613 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-01-19 John Camelon
|
||||
Updated ParserSymbolTableTest to accommodate new constructors for COMPLETE_PARSE ASTNodes (line # info).
|
||||
Updated CModelElementsTest to enable testing for line numbers.
|
||||
Removed CModelElementsFailedTests.testBug36379() as it is redundant due to CModelElementTests.testCModelElements() is complete.
|
||||
Removed CModelElementsFailedTests from AutomatedIntegrationSuite as it is empty.
|
||||
|
||||
2004-01-16 Andrew Niefer
|
||||
Modified CompleteParseASTTest.testUsingClauses
|
||||
Added ParserSymbolTableTest.testIterator_1 & testIterator_2
|
||||
|
|
|
@ -73,26 +73,4 @@ public class CModelElementsFailedTests extends TestCase {
|
|||
protected void tearDown() {
|
||||
CProjectHelper.delete(fCProject);
|
||||
}
|
||||
|
||||
public void testBug36379() {
|
||||
TranslationUnit tu = new TranslationUnit(fCProject, headerFile);
|
||||
// parse the translation unit to get the elements tree
|
||||
Map newElement = tu.parse(); // require line numbers
|
||||
|
||||
// tu ---> namespace: MyPackage
|
||||
ArrayList tuPackages = tu.getChildrenOfType(ICElement.C_NAMESPACE);
|
||||
|
||||
INamespace namespace = (INamespace) tuPackages.get(0);
|
||||
assertEquals(namespace.getElementName(), new String("MyPackage"));
|
||||
|
||||
// MyPackage ---> class: Hello
|
||||
ArrayList nsClasses = namespace.getChildrenOfType(ICElement.C_CLASS);
|
||||
IStructure classHello = (IStructure) nsClasses.get(0);
|
||||
assertEquals(classHello.getElementName(), new String("Hello"));
|
||||
|
||||
// Bug 36379: parser does not provide line number information for nested definitions
|
||||
assertEquals(0, ((CElement)classHello).getStartLine());
|
||||
assertEquals(0, ((CElement)classHello).getEndLine());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.core.model.tests;
|
|||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
|
@ -89,7 +88,7 @@ public class CModelElementsTests extends TestCase {
|
|||
public void testCModelElements(){
|
||||
TranslationUnit tu = new TranslationUnit(fCProject, headerFile);
|
||||
// parse the translation unit to get the elements tree
|
||||
Map newElement = tu.parse();
|
||||
tu.parse();
|
||||
|
||||
// tu ---> include
|
||||
checkInclude(tu);
|
||||
|
@ -438,13 +437,13 @@ public class CModelElementsTests extends TestCase {
|
|||
// template method
|
||||
ArrayList nsClasses = namespace.getChildrenOfType(ICElement.C_CLASS);
|
||||
IStructure enclosingClass = (IStructure) nsClasses.get(1);
|
||||
checkLineNumbers((CElement)enclosingClass, 114, 118);
|
||||
checkLineNumbers((CElement)enclosingClass, 115, 120);
|
||||
ArrayList methodTemplates = enclosingClass.getChildrenOfType(ICElement.C_TEMPLATE_METHOD);
|
||||
MethodTemplate mt = (MethodTemplate)methodTemplates.get(0);
|
||||
assertEquals(mt.getElementName(), new String("aTemplatedMethod"));
|
||||
checkElementOffset((CElement)mt);
|
||||
assertEquals(mt.getTemplateSignature(), new String("aTemplatedMethod<A, B>(B) : A"));
|
||||
checkLineNumbers((CElement)mt, 118, 119);
|
||||
checkLineNumbers((CElement)mt, 118, 119 );
|
||||
assertEquals(mt.getVisibility(), ASTAccessVisibility.PUBLIC);
|
||||
|
||||
// template class
|
||||
|
@ -499,9 +498,8 @@ public class CModelElementsTests extends TestCase {
|
|||
|
||||
}
|
||||
private void checkLineNumbers(CElement element, int startLine, int endLine){
|
||||
// Remove comments when testBug36379() is fixed
|
||||
// assertEquals(startLine, element.getStartLine());
|
||||
// assertEquals(endLine, element.getEndLine());
|
||||
assertEquals(startLine, element.getStartLine());
|
||||
assertEquals(endLine, element.getEndLine());
|
||||
}
|
||||
private void checkElementOffset(CElement element){
|
||||
if(element.getElementName().length() > 0 ){
|
||||
|
|
|
@ -3246,15 +3246,15 @@ public class ParserSymbolTableTest extends TestCase {
|
|||
ISymbolASTExtension cuExtension = new StandardSymbolExtension( table.getCompilationUnit(), (ASTSymbol) compUnit );
|
||||
table.getCompilationUnit().setASTExtension( cuExtension );
|
||||
|
||||
IASTClassSpecifier clsSpec = new ASTClassSpecifier( A, ASTClassKind.CLASS, ClassNameType.IDENTIFIER, ASTAccessVisibility.PUBLIC, 0, 0, 0, new ArrayList( ) );
|
||||
IASTClassSpecifier clsSpec = new ASTClassSpecifier( A, ASTClassKind.CLASS, ClassNameType.IDENTIFIER, ASTAccessVisibility.PUBLIC, 0, 0, 0, 0, 0, new ArrayList( ) );
|
||||
ISymbolASTExtension clsExtension = new StandardSymbolExtension( A, (ASTSymbol) clsSpec );
|
||||
A.setASTExtension( clsExtension );
|
||||
|
||||
IASTField field = new ASTField(i, null, null, null, 0, 0, 0, new ArrayList(), false, null, ASTAccessVisibility.PUBLIC );
|
||||
IASTField field = new ASTField(i, null, null, null, 0, 0, 0, 0, 0, new ArrayList(), false, null, ASTAccessVisibility.PUBLIC );
|
||||
ISymbolASTExtension extension = new StandardSymbolExtension( i, (ASTSymbol) field );
|
||||
i.setASTExtension( extension );
|
||||
|
||||
field = new ASTField(i, null, null, null, 0, 0, 0, new ArrayList(), false, null, ASTAccessVisibility.PRIVATE );
|
||||
field = new ASTField(i, null, null, null, 0, 0, 0, 0, 0, new ArrayList(), false, null, ASTAccessVisibility.PRIVATE );
|
||||
extension = new StandardSymbolExtension( j, (ASTSymbol) field );
|
||||
j.setASTExtension( extension );
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ import org.eclipse.cdt.core.build.managed.tests.ManagedBuildTests;
|
|||
import org.eclipse.cdt.core.build.managed.tests.StandardBuildTests;
|
||||
import org.eclipse.cdt.core.indexer.tests.DependencyTests;
|
||||
import org.eclipse.cdt.core.indexer.tests.IndexManagerTests;
|
||||
import org.eclipse.cdt.core.model.failedTests.CModelElementsFailedTests;
|
||||
import org.eclipse.cdt.core.model.tests.AllCoreTests;
|
||||
import org.eclipse.cdt.core.model.tests.BinaryTests;
|
||||
import org.eclipse.cdt.core.model.tests.ElementDeltaTests;
|
||||
|
@ -67,7 +66,6 @@ public class AutomatedIntegrationSuite extends TestSuite {
|
|||
// Add all failed tests
|
||||
suite.addTestSuite(ASTFailedTests.class);
|
||||
suite.addTestSuite(STLFailedTests.class);
|
||||
suite.addTestSuite(CModelElementsFailedTests.class);
|
||||
suite.addTestSuite(FailedCompleteParseASTTest.class);
|
||||
|
||||
return suite;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
2004-01-19 John Camelon
|
||||
Updated CModelBuilder to access line number information from IASTOffsetableElement.
|
||||
|
||||
2004-01-16 Hoda Amer
|
||||
Solution to bug#47552: IEnumerator#getConstantExpression is always empty
|
||||
|
||||
|
|
|
@ -237,7 +237,8 @@ public class CModelBuilder {
|
|||
CElement element = createAbstractElement(parent, abstractDeclaration , true);
|
||||
if(element != null){
|
||||
// set the element position
|
||||
element.setPos(templateDeclaration.getStartingOffset(), templateDeclaration.getEndingOffset() - templateDeclaration.getStartingOffset());
|
||||
element.setPos(templateDeclaration.getStartingOffset(), templateDeclaration.getEndingOffset() - templateDeclaration.getStartingOffset());
|
||||
element.setLines( templateDeclaration.getStartingLine(), templateDeclaration.getEndingLine() );
|
||||
// set the template parameters
|
||||
String[] parameterTypes = ASTUtil.getTemplateParameters(templateDeclaration);
|
||||
ITemplate classTemplate = (ITemplate) element;
|
||||
|
@ -250,7 +251,8 @@ public class CModelBuilder {
|
|||
if(template != null){
|
||||
CElement element = (CElement)template;
|
||||
// set the element position
|
||||
element.setPos(templateDeclaration.getStartingOffset(), templateDeclaration.getEndingOffset() - templateDeclaration.getStartingOffset());
|
||||
element.setPos(templateDeclaration.getStartingOffset(), templateDeclaration.getEndingOffset() - templateDeclaration.getStartingOffset());
|
||||
element.setLines( templateDeclaration.getStartingLine(), templateDeclaration.getEndingLine() );
|
||||
// set the template parameters
|
||||
String[] parameterTypes = ASTUtil.getTemplateParameters(templateDeclaration);
|
||||
template.setTemplateParameterTypes(parameterTypes);
|
||||
|
@ -318,7 +320,7 @@ public class CModelBuilder {
|
|||
// set position
|
||||
element.setIdPos(inclusion.getNameOffset(), inclusion.getNameEndOffset() - inclusion.getNameOffset());
|
||||
element.setPos(inclusion.getStartingOffset(), inclusion.getEndingOffset() - inclusion.getStartingOffset());
|
||||
|
||||
element.setLines( inclusion.getStartingLine(), inclusion.getEndingLine() );
|
||||
this.newElements.put(element, element.getElementInfo());
|
||||
return element;
|
||||
}
|
||||
|
@ -331,7 +333,7 @@ public class CModelBuilder {
|
|||
// set position
|
||||
element.setIdPos(macro.getNameOffset(), macro.getNameEndOffset() - macro.getNameOffset());
|
||||
element.setPos(macro.getStartingOffset(), macro.getEndingOffset() - macro.getStartingOffset());
|
||||
|
||||
element.setLines( macro.getStartingLine(), macro.getEndingLine() );
|
||||
this.newElements.put(element, element.getElementInfo());
|
||||
return element;
|
||||
}
|
||||
|
@ -348,6 +350,7 @@ public class CModelBuilder {
|
|||
element.setIdPos(nsDef.getNameOffset(),
|
||||
(nsName.length() == 0) ? type.length() : (nsDef.getNameEndOffset() - nsDef.getNameOffset()));
|
||||
element.setPos(nsDef.getStartingOffset(), nsDef.getEndingOffset() - nsDef.getStartingOffset());
|
||||
element.setLines( nsDef.getStartingLine(), nsDef.getEndingLine() );
|
||||
element.setTypeName(type);
|
||||
|
||||
this.newElements.put(element, element.getElementInfo());
|
||||
|
@ -373,6 +376,7 @@ public class CModelBuilder {
|
|||
element.setIdPos(enumSpecifier.getNameOffset(),
|
||||
(enumName.length() == 0) ? type.length() : (enumSpecifier.getNameEndOffset() - enumSpecifier.getNameOffset() ));
|
||||
element.setPos(enumSpecifier.getStartingOffset(), enumSpecifier.getEndingOffset() - enumSpecifier.getStartingOffset());
|
||||
element.setLines( enumSpecifier.getStartingLine(), enumSpecifier.getEndingLine() );
|
||||
element.setTypeName(type);
|
||||
|
||||
this.newElements.put(element, element.getElementInfo());
|
||||
|
@ -393,7 +397,7 @@ public class CModelBuilder {
|
|||
// set enumerator position
|
||||
element.setIdPos(enumDef.getStartingOffset(), (enumDef.getNameEndOffset() - enumDef.getNameOffset()));
|
||||
element.setPos(enumDef.getStartingOffset(), enumDef.getEndingOffset() - enumDef.getStartingOffset());
|
||||
|
||||
element.setLines( enumDef.getStartingLine(), enumDef.getEndingLine() );
|
||||
this.newElements.put(element, element.getElementInfo());
|
||||
return element;
|
||||
}
|
||||
|
@ -461,6 +465,7 @@ public class CModelBuilder {
|
|||
// set the element position
|
||||
element.setPos(classSpecifier.getStartingOffset(), classSpecifier.getEndingOffset() - classSpecifier.getStartingOffset());
|
||||
}
|
||||
element.setLines( classSpecifier.getStartingLine(), classSpecifier.getEndingLine() );
|
||||
|
||||
this.newElements.put(element, element.getElementInfo());
|
||||
return element;
|
||||
|
@ -481,7 +486,7 @@ public class CModelBuilder {
|
|||
// set positions
|
||||
element.setIdPos(typeDefDeclaration.getNameOffset(), (typeDefDeclaration.getNameEndOffset() - typeDefDeclaration.getNameOffset()));
|
||||
element.setPos(typeDefDeclaration.getStartingOffset(), typeDefDeclaration.getEndingOffset() - typeDefDeclaration.getStartingOffset());
|
||||
|
||||
element.setLines( typeDefDeclaration.getStartingLine(), typeDefDeclaration.getEndingLine() );
|
||||
this.newElements.put(element, element.getElementInfo());
|
||||
return element;
|
||||
}
|
||||
|
@ -537,7 +542,7 @@ public class CModelBuilder {
|
|||
// set element position
|
||||
element.setPos(varDeclaration.getStartingOffset(), varDeclaration.getEndingOffset() - varDeclaration.getStartingOffset());
|
||||
}
|
||||
|
||||
element.setLines( varDeclaration.getStartingLine(), varDeclaration.getEndingLine() );
|
||||
this.newElements.put(element, element.getElementInfo());
|
||||
return element;
|
||||
}
|
||||
|
@ -637,6 +642,7 @@ public class CModelBuilder {
|
|||
// set the element position
|
||||
element.setPos(functionDeclaration.getStartingOffset(), functionDeclaration.getEndingOffset() - functionDeclaration.getStartingOffset());
|
||||
}
|
||||
element.setLines( functionDeclaration.getStartingLine(), functionDeclaration.getEndingLine() );
|
||||
|
||||
this.newElements.put(element, element.getElementInfo());
|
||||
return element;
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2004-01-19 John Camelon
|
||||
Added IToken.getLineNumber() to facilitate adding line numbers to AST.
|
||||
Added line number support into IASTOffsetableElement. Updated all implementations to use this.
|
||||
Updated Parser and IASTFactory to populate IASTOffsetableElement with the values retrieved from IToken.
|
||||
Removed IScanner.getLineNumberForOffset().
|
||||
|
||||
2004-01-16 Andrew Niefer
|
||||
Created IExtensibleSymbol, which is a new base class for the symbol interfaces
|
||||
Created IUsingDirectiveSymbol and UsingDirectiveSymbol
|
||||
|
|
|
@ -34,5 +34,5 @@ public interface IScanner {
|
|||
public IToken nextTokenForStringizing() throws ScannerException, EndOfFileException;
|
||||
public void setTokenizingMacroReplacementList(boolean b);
|
||||
public void setThrowExceptionOnBadCharacterRead( boolean throwOnBad );
|
||||
public int getLineNumberForOffset(int i);
|
||||
|
||||
}
|
||||
|
|
|
@ -23,6 +23,10 @@ public interface IToken {
|
|||
public abstract int getOffset();
|
||||
public abstract int getLength();
|
||||
public abstract int getEndOffset();
|
||||
|
||||
// NOTE:if the token spans lines due to escaped newlines then
|
||||
// the line number returned is the last one
|
||||
public int getLineNumber();
|
||||
public abstract int getDelta(IToken other);
|
||||
public abstract IToken getNext();
|
||||
public abstract void setNext(IToken t);
|
||||
|
|
|
@ -26,52 +26,52 @@ public interface IASTFactory
|
|||
public IASTMacro createMacro(
|
||||
String name,
|
||||
int startingOffset,
|
||||
int nameOffset,
|
||||
int nameEndOffset, int endingOffset, IMacroDescriptor info);
|
||||
int startingLine,
|
||||
int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endingLine, IMacroDescriptor info);
|
||||
|
||||
public IASTInclusion createInclusion(
|
||||
String name,
|
||||
String fileName,
|
||||
boolean local,
|
||||
int startingOffset,
|
||||
int nameOffset,
|
||||
int nameEndOffset, int endingOffset) ;
|
||||
int startingLine,
|
||||
int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endingLine) ;
|
||||
|
||||
public IASTUsingDirective createUsingDirective(
|
||||
IASTScope scope,
|
||||
ITokenDuple duple, int startingOffset, int endingOffset)
|
||||
ITokenDuple duple, int startingOffset, int startingLine, int endingOffset, int endingLine)
|
||||
throws ASTSemanticException;
|
||||
|
||||
public IASTUsingDeclaration createUsingDeclaration(
|
||||
IASTScope scope,
|
||||
boolean isTypeName,
|
||||
ITokenDuple name, int startingOffset, int endingOffset) throws ASTSemanticException;
|
||||
ITokenDuple name, int startingOffset, int startingLine, int endingOffset, int endingLine) throws ASTSemanticException;
|
||||
|
||||
public IASTASMDefinition createASMDefinition(
|
||||
IASTScope scope,
|
||||
String assembly,
|
||||
int first,
|
||||
int last);
|
||||
int startingOffset,
|
||||
int startingLine, int endingOffset, int endingLine);
|
||||
|
||||
public IASTNamespaceDefinition createNamespaceDefinition(
|
||||
IASTScope scope,
|
||||
String identifier,
|
||||
int startingOffset,
|
||||
int nameOffset, int nameEndOffset) throws ASTSemanticException;
|
||||
int startingLine, int nameOffset, int nameEndOffset, int nameLineNumber) throws ASTSemanticException;
|
||||
|
||||
public IASTNamespaceAlias createNamespaceAlias(
|
||||
IASTScope scope,
|
||||
String identifier,
|
||||
ITokenDuple alias,
|
||||
int startingOffset,
|
||||
int nameOffset,
|
||||
int nameEndOffset, int endOffset ) throws ASTSemanticException;
|
||||
int startingLine,
|
||||
int nameOffset, int nameEndOffset, int nameLine, int endOffset, int endingLine ) throws ASTSemanticException;
|
||||
|
||||
public IASTCompilationUnit createCompilationUnit() ;
|
||||
|
||||
public IASTLinkageSpecification createLinkageSpecification(
|
||||
IASTScope scope,
|
||||
String spec, int startingOffset) ;
|
||||
String spec, int startingOffset, int startingLine) ;
|
||||
|
||||
public IASTClassSpecifier createClassSpecifier(
|
||||
IASTScope scope,
|
||||
|
@ -80,7 +80,7 @@ public interface IASTFactory
|
|||
ClassNameType type,
|
||||
ASTAccessVisibility access,
|
||||
int startingOffset,
|
||||
int nameOffset, int nameEndOffset) throws ASTSemanticException;
|
||||
int startingLine, int nameOffset, int nameEndOffset, int nameLine) throws ASTSemanticException;
|
||||
|
||||
/**
|
||||
* @param astClassSpec
|
||||
|
@ -98,18 +98,18 @@ public interface IASTFactory
|
|||
IASTScope scope,
|
||||
ASTClassKind elaboratedClassKind,
|
||||
ITokenDuple typeName,
|
||||
int startingOffset, int endOffset, boolean isForewardDecl, boolean isFriend) throws ASTSemanticException;
|
||||
int startingOffset, int startingLine, int endOffset, int endingLine, boolean isForewardDecl, boolean isFriend) throws ASTSemanticException;
|
||||
|
||||
public IASTEnumerationSpecifier createEnumerationSpecifier(
|
||||
IASTScope scope,
|
||||
String name,
|
||||
int startingOffset, int nameOffset, int nameEndOffset) throws ASTSemanticException;
|
||||
int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine) throws ASTSemanticException;
|
||||
|
||||
public void addEnumerator(
|
||||
IASTEnumerationSpecifier enumeration,
|
||||
String string,
|
||||
int startingOffset,
|
||||
int nameOffset, int nameEndOffset, int endingOffset, IASTExpression initialValue)throws ASTSemanticException;
|
||||
int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endLine, IASTExpression initialValue)throws ASTSemanticException;
|
||||
|
||||
public IASTExpression createExpression(
|
||||
IASTScope scope,
|
||||
|
@ -163,14 +163,14 @@ public interface IASTFactory
|
|||
boolean isFriend,
|
||||
boolean isStatic,
|
||||
int startOffset,
|
||||
int startLine,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
int nameEndOffset,
|
||||
int nameLine,
|
||||
IASTTemplate ownerTemplate,
|
||||
boolean isConst,
|
||||
boolean isVolatile,
|
||||
boolean isVirtual,
|
||||
boolean isExplicit,
|
||||
boolean isPureVirtual, List constructorChain, boolean isDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments ) throws ASTSemanticException;
|
||||
boolean isVirtual, boolean isExplicit, boolean isPureVirtual, List constructorChain, boolean isDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments ) throws ASTSemanticException;
|
||||
|
||||
|
||||
public IASTAbstractDeclaration createAbstractDeclaration(
|
||||
|
@ -189,35 +189,35 @@ public interface IASTFactory
|
|||
boolean isFriend,
|
||||
boolean isStatic,
|
||||
int startOffset,
|
||||
int startLine,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
int nameLine,
|
||||
IASTTemplate ownerTemplate,
|
||||
boolean isConst,
|
||||
boolean isVolatile,
|
||||
boolean isVirtual,
|
||||
boolean isExplicit,
|
||||
boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments) throws ASTSemanticException;
|
||||
boolean isVirtual, boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments) throws ASTSemanticException;
|
||||
|
||||
public IASTVariable createVariable(IASTScope scope, String name, boolean isAuto, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression,
|
||||
IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int nameOffset, int nameEndOffset, IASTExpression constructorExpression ) throws ASTSemanticException;
|
||||
IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, 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, int nameEndOffset, 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 startingLine, int nameOffset, int nameEndOffset, int nameLine, IASTExpression constructorExpression, ASTAccessVisibility visibility) throws ASTSemanticException;
|
||||
|
||||
public IASTDesignator createDesignator( IASTDesignator.DesignatorKind kind, IASTExpression constantExpression, IToken fieldIdentifier );
|
||||
|
||||
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 IASTParameterDeclaration createParameterDeclaration( boolean isConst, boolean isVolatile, IASTTypeSpecifier getTypeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endingLine ) ;
|
||||
|
||||
public IASTTemplateDeclaration createTemplateDeclaration( IASTScope scope, List templateParameters, boolean exported, int startingOffset ) ;
|
||||
public IASTTemplateDeclaration createTemplateDeclaration( IASTScope scope, List templateParameters, boolean exported, int startingOffset, int startingLine ) ;
|
||||
|
||||
public IASTTemplateParameter createTemplateParameter( IASTTemplateParameter.ParamKind kind, String identifier, String defaultValue, IASTParameterDeclaration parameter, List parms ) ;
|
||||
|
||||
public IASTTemplateInstantiation createTemplateInstantiation(IASTScope scope, int startingOffset);
|
||||
public IASTTemplateInstantiation createTemplateInstantiation(IASTScope scope, int startingOffset, int startingLine);
|
||||
|
||||
public IASTTemplateSpecialization createTemplateSpecialization(IASTScope scope, int startingOffset);
|
||||
public IASTTemplateSpecialization createTemplateSpecialization(IASTScope scope, int startingOffset, int startingLine);
|
||||
|
||||
public IASTTypedefDeclaration createTypedef( IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, int nameEndOffset ) throws ASTSemanticException;
|
||||
public IASTTypedefDeclaration createTypedef( IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine ) 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 startingLine, int endingOffset, int endingLine);
|
||||
|
||||
public boolean queryIsTypeName( IASTScope scope, ITokenDuple nameInQuestion ) ;
|
||||
|
||||
|
|
|
@ -16,10 +16,13 @@ package org.eclipse.cdt.core.parser.ast;
|
|||
*/
|
||||
public interface IASTOffsetableElement {
|
||||
|
||||
public void setStartingOffset( int o );
|
||||
public void setEndingOffset( int o );
|
||||
public void setStartingOffsetAndLineNumber( int offset, int lineNumber );
|
||||
public void setEndingOffsetAndLineNumber( int offset, int lineNumber );
|
||||
|
||||
public int getStartingOffset();
|
||||
public int getEndingOffset();
|
||||
|
||||
public int getStartingLine();
|
||||
public int getEndingLine();
|
||||
|
||||
}
|
||||
|
|
|
@ -21,5 +21,6 @@ public interface IASTOffsetableNamedElement extends IASTOffsetableElement {
|
|||
public int getNameOffset();
|
||||
public void setNameOffset( int o );
|
||||
public int getNameEndOffset();
|
||||
public void setNameEndOffset( int o );
|
||||
public void setNameEndOffsetAndLineNumber( int offset, int lineNumber );
|
||||
public int getNameLineNumber();
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
mutable = false,
|
||||
friend = false,
|
||||
inline = false;
|
||||
private int startingLine;
|
||||
/**
|
||||
* @param b
|
||||
*/
|
||||
|
@ -85,10 +86,11 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
public DeclarationWrapper(
|
||||
IASTScope scope,
|
||||
int startingOffset,
|
||||
IASTTemplate templateDeclaration)
|
||||
int startingLine, IASTTemplate templateDeclaration)
|
||||
{
|
||||
this.scope = scope;
|
||||
this.startingOffset = startingOffset;
|
||||
this.startingLine = startingLine;
|
||||
this.templateDeclaration = templateDeclaration;
|
||||
}
|
||||
/**
|
||||
|
@ -238,6 +240,11 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
{
|
||||
return startingOffset;
|
||||
}
|
||||
|
||||
public int getStartingLine()
|
||||
{
|
||||
return startingLine;
|
||||
}
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
|
@ -296,6 +303,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
typeSpecifier = specifier;
|
||||
}
|
||||
private IASTFactory astFactory = null;
|
||||
private int endLine;
|
||||
/**
|
||||
* @param requestor
|
||||
*/
|
||||
|
@ -398,7 +406,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
return astFactory.createTypedef(
|
||||
scope,
|
||||
name,
|
||||
abs, getStartingOffset(), d.getNameStartOffset(), d.getNameEndOffset() );
|
||||
abs, getStartingOffset(), getStartingLine(), d.getNameStartOffset(), d.getNameEndOffset(), d.getNameLine() );
|
||||
}
|
||||
catch (ASTSemanticException e1)
|
||||
{
|
||||
|
@ -411,7 +419,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
else
|
||||
try
|
||||
{
|
||||
return astFactory.createVariable( scope, name, auto, d.getInitializerClause(), d.getBitFieldExpression(), abs, mutable, extern, register, staticc, getStartingOffset(), d.getNameStartOffset(), d.getNameEndOffset(), d.getConstructorExpression() );
|
||||
return astFactory.createVariable( scope, name, auto, d.getInitializerClause(), d.getBitFieldExpression(), abs, mutable, extern, register, staticc, getStartingOffset(), getStartingLine(), d.getNameStartOffset(), d.getNameEndOffset(), d.getNameLine(), d.getConstructorExpression() );
|
||||
}
|
||||
catch (Exception e2)
|
||||
{
|
||||
|
@ -441,7 +449,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
constt,
|
||||
volatil,
|
||||
getTypeSpecifier(),
|
||||
declarator.getPointerOperators(), declarator.getArrayModifiers(), null, null), startingOffset, declarator.getNameStartOffset(), declarator.getNameEndOffset());
|
||||
declarator.getPointerOperators(), declarator.getArrayModifiers(), null, null), startingOffset, getStartingLine(), declarator.getNameStartOffset(), declarator.getNameEndOffset(), declarator.getNameLine());
|
||||
}
|
||||
catch (ASTSemanticException e)
|
||||
{
|
||||
|
@ -475,15 +483,15 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
friend,
|
||||
staticc,
|
||||
startingOffset,
|
||||
getStartingLine(),
|
||||
declarator.getNameStartOffset(),
|
||||
declarator.getNameEndOffset(),
|
||||
declarator.getNameLine(),
|
||||
templateDeclaration,
|
||||
declarator.isConst(),
|
||||
declarator.isVolatile(),
|
||||
virtual,
|
||||
explicit,
|
||||
declarator.isPureVirtual(), ((IASTClassSpecifier)scope).getCurrentVisibilityMode(),
|
||||
declarator.getConstructorMemberInitializers(), declarator.hasFunctionBody(), declarator.hasFunctionTryBlock(), declarator.isVarArgs());
|
||||
virtual, explicit,
|
||||
declarator.isPureVirtual(), ((IASTClassSpecifier)scope).getCurrentVisibilityMode(), declarator.getConstructorMemberInitializers(), declarator.hasFunctionBody(), declarator.hasFunctionTryBlock(), declarator.isVarArgs());
|
||||
}
|
||||
catch (ASTSemanticException e)
|
||||
{
|
||||
|
@ -516,16 +524,16 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
friend,
|
||||
staticc,
|
||||
startingOffset,
|
||||
getStartingLine(),
|
||||
declarator.getNameStartOffset(),
|
||||
declarator.getNameEndOffset(),
|
||||
declarator.getNameEndOffset(),
|
||||
declarator.getNameLine(),
|
||||
templateDeclaration,
|
||||
declarator.isConst(),
|
||||
declarator.isVolatile(),
|
||||
virtual,
|
||||
explicit,
|
||||
declarator.isPureVirtual(),
|
||||
declarator.getConstructorMemberInitializers(), declarator.hasFunctionBody(), declarator.hasFunctionTryBlock(),
|
||||
declarator.isVarArgs() );
|
||||
explicit, declarator.isPureVirtual(), declarator.getConstructorMemberInitializers(),
|
||||
declarator.hasFunctionBody(), declarator.hasFunctionTryBlock(), declarator.isVarArgs() );
|
||||
}
|
||||
catch (ASTSemanticException e)
|
||||
{
|
||||
|
@ -560,8 +568,8 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
register,
|
||||
staticc,
|
||||
startingOffset,
|
||||
declarator.getNameStartOffset(),
|
||||
declarator.getNameEndOffset(), declarator.getConstructorExpression(), ((IASTClassSpecifier)scope).getCurrentVisibilityMode());
|
||||
getStartingLine(),
|
||||
declarator.getNameStartOffset(), declarator.getNameEndOffset(), declarator.getNameLine(), declarator.getConstructorExpression(), ((IASTClassSpecifier)scope).getCurrentVisibilityMode());
|
||||
}
|
||||
catch (ASTSemanticException e)
|
||||
{
|
||||
|
@ -594,7 +602,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
declarator.getArrayModifiers(),
|
||||
null, null, declarator.getName() == null
|
||||
? ""
|
||||
: declarator.getName(), declarator.getInitializerClause(), wrapper.getStartingOffset(), declarator.getNameStartOffset(), declarator.getNameEndOffset(), wrapper.getEndOffset()));
|
||||
: declarator.getName(), declarator.getInitializerClause(), wrapper.getStartingOffset(), getStartingLine(), declarator.getNameStartOffset(), declarator.getNameEndOffset(), declarator.getNameLine(), wrapper.getEndOffset(), getEndLine()));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -628,7 +636,7 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
register,
|
||||
staticc,
|
||||
getStartingOffset(),
|
||||
declarator.getNameStartOffset(), declarator.getNameEndOffset(), declarator.getConstructorExpression());
|
||||
getStartingLine(), declarator.getNameStartOffset(), declarator.getNameEndOffset(), declarator.getNameLine(), declarator.getConstructorExpression());
|
||||
}
|
||||
catch (ASTSemanticException e)
|
||||
{
|
||||
|
@ -748,9 +756,10 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
/**
|
||||
* @param i
|
||||
*/
|
||||
public void setEndingOffset(int i)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
endOffset = i;
|
||||
endOffset = offset;
|
||||
endLine = lineNumber;
|
||||
}
|
||||
/**
|
||||
* @return
|
||||
|
@ -759,6 +768,11 @@ public class DeclarationWrapper implements IDeclaratorOwner
|
|||
{
|
||||
return endOffset;
|
||||
}
|
||||
|
||||
public int getEndLine()
|
||||
{
|
||||
return endLine;
|
||||
}
|
||||
/**
|
||||
* @param b
|
||||
*/
|
||||
|
|
|
@ -52,7 +52,8 @@ public class Declarator implements IParameterCollection, IDeclaratorOwner, IDecl
|
|||
|
||||
|
||||
private int nameStartOffset, nameEndOffset;
|
||||
private boolean varArgs;
|
||||
private boolean varArgs;
|
||||
private int nameLine;
|
||||
|
||||
public Declarator( IDeclaratorOwner owner )
|
||||
{
|
||||
|
@ -75,6 +76,11 @@ public class Declarator implements IParameterCollection, IDeclaratorOwner, IDecl
|
|||
return nameEndOffset;
|
||||
}
|
||||
|
||||
public int getNameLine()
|
||||
{
|
||||
return nameLine;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
|
@ -102,9 +108,9 @@ public class Declarator implements IParameterCollection, IDeclaratorOwner, IDecl
|
|||
/**
|
||||
* @param i
|
||||
*/
|
||||
public void setNameEndOffset(int i)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
nameEndOffset = i;
|
||||
nameEndOffset = offset;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -114,7 +120,7 @@ public class Declarator implements IParameterCollection, IDeclaratorOwner, IDecl
|
|||
{
|
||||
nameStartOffset = i;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
|
@ -175,7 +181,7 @@ public class Declarator implements IParameterCollection, IDeclaratorOwner, IDecl
|
|||
{
|
||||
setName( duple.toString() );
|
||||
setNameStartOffset( duple.getFirstToken().getOffset());
|
||||
setNameEndOffset( duple.getLastToken().getEndOffset());
|
||||
setNameEndOffsetAndLineNumber( duple.getLastToken().getEndOffset(), duple.getLastToken().getLineNumber());
|
||||
namedDuple = duple;
|
||||
}
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ public abstract class Parser implements IParser
|
|||
|
||||
try
|
||||
{
|
||||
astUD = astFactory.createUsingDirective(scope, duple, firstToken.getOffset(), last.getEndOffset());
|
||||
astUD = astFactory.createUsingDirective(scope, duple, firstToken.getOffset(), firstToken.getLineNumber(), last.getEndOffset(), last.getLineNumber());
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
|
@ -320,7 +320,7 @@ public abstract class Parser implements IParser
|
|||
typeName,
|
||||
name,
|
||||
firstToken.getOffset(),
|
||||
last.getEndOffset());
|
||||
firstToken.getLineNumber(), last.getEndOffset(), last.getLineNumber());
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
|
@ -362,7 +362,7 @@ public abstract class Parser implements IParser
|
|||
astFactory.createLinkageSpecification(
|
||||
scope,
|
||||
spec.getImage(),
|
||||
firstToken.getOffset());
|
||||
firstToken.getOffset(), firstToken.getLineNumber());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -395,7 +395,7 @@ public abstract class Parser implements IParser
|
|||
}
|
||||
// consume the }
|
||||
IToken lastToken = consume();
|
||||
linkage.setEndingOffset(lastToken.getEndOffset());
|
||||
linkage.setEndingOffsetAndLineNumber(lastToken.getEndOffset(), lastToken.getLineNumber());
|
||||
linkage.exitScope( requestor );
|
||||
}
|
||||
else // single declaration
|
||||
|
@ -407,7 +407,7 @@ public abstract class Parser implements IParser
|
|||
astFactory.createLinkageSpecification(
|
||||
scope,
|
||||
spec.getImage(),
|
||||
firstToken.getOffset());
|
||||
firstToken.getOffset(), firstToken.getLineNumber());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -452,7 +452,7 @@ public abstract class Parser implements IParser
|
|||
templateInstantiation =
|
||||
astFactory.createTemplateInstantiation(
|
||||
scope,
|
||||
firstToken.getOffset());
|
||||
firstToken.getOffset(), firstToken.getLineNumber());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -460,7 +460,7 @@ public abstract class Parser implements IParser
|
|||
}
|
||||
templateInstantiation.enterScope( requestor );
|
||||
declaration(scope, templateInstantiation);
|
||||
templateInstantiation.setEndingOffset(lastToken.getEndOffset());
|
||||
templateInstantiation.setEndingOffsetAndLineNumber(lastToken.getEndOffset(), lastToken.getLineNumber());
|
||||
templateInstantiation.exitScope( requestor );
|
||||
|
||||
return;
|
||||
|
@ -479,7 +479,7 @@ public abstract class Parser implements IParser
|
|||
templateSpecialization =
|
||||
astFactory.createTemplateSpecialization(
|
||||
scope,
|
||||
firstToken.getOffset());
|
||||
firstToken.getOffset(), firstToken.getLineNumber());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -487,8 +487,8 @@ public abstract class Parser implements IParser
|
|||
}
|
||||
templateSpecialization.enterScope(requestor);
|
||||
declaration(scope, templateSpecialization);
|
||||
templateSpecialization.setEndingOffset(
|
||||
lastToken.getEndOffset());
|
||||
templateSpecialization.setEndingOffsetAndLineNumber(
|
||||
lastToken.getEndOffset(), lastToken.getLineNumber());
|
||||
templateSpecialization.exitScope(requestor);
|
||||
return;
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ public abstract class Parser implements IParser
|
|||
scope,
|
||||
parms,
|
||||
exported,
|
||||
firstToken.getOffset());
|
||||
firstToken.getOffset(), firstToken.getLineNumber());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -514,8 +514,8 @@ public abstract class Parser implements IParser
|
|||
}
|
||||
templateDecl.enterScope( requestor );
|
||||
declaration(scope, templateDecl );
|
||||
templateDecl.setEndingOffset(
|
||||
lastToken.getEndOffset() );
|
||||
templateDecl.setEndingOffsetAndLineNumber(
|
||||
lastToken.getEndOffset(), lastToken.getLineNumber() );
|
||||
templateDecl.exitScope( requestor );
|
||||
|
||||
}
|
||||
|
@ -668,7 +668,7 @@ public abstract class Parser implements IParser
|
|||
declarator.getArrayModifiers(),
|
||||
null, null, declarator.getName() == null
|
||||
? ""
|
||||
: declarator.getName(), declarator.getInitializerClause(), wrapper.getStartingOffset(), declarator.getNameStartOffset(), declarator.getNameEndOffset(), wrapper.getEndOffset()),
|
||||
: declarator.getName(), declarator.getInitializerClause(), wrapper.getStartingOffset(), wrapper.getStartingLine(), declarator.getNameStartOffset(), declarator.getNameEndOffset(), declarator.getNameLine(), wrapper.getEndOffset(), wrapper.getEndLine()),
|
||||
null));
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -725,7 +725,7 @@ public abstract class Parser implements IParser
|
|||
scope,
|
||||
assembly,
|
||||
first.getOffset(),
|
||||
last.getEndOffset());
|
||||
first.getLineNumber(), last.getEndOffset(), last.getLineNumber());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -842,8 +842,10 @@ public abstract class Parser implements IParser
|
|||
scope,
|
||||
(identifier == null ? "" : identifier.getImage()),
|
||||
first.getOffset(),
|
||||
first.getLineNumber(),
|
||||
(identifier == null ? first.getOffset() : identifier.getOffset()),
|
||||
(identifier == null ? first.getEndOffset() : identifier.getEndOffset() ));
|
||||
(identifier == null ? first.getEndOffset() : identifier.getEndOffset() ),
|
||||
(identifier == null ? first.getLineNumber() : identifier.getLineNumber() ));
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
|
@ -876,8 +878,8 @@ public abstract class Parser implements IParser
|
|||
// consume the }
|
||||
IToken last = consume(IToken.tRBRACE);
|
||||
|
||||
namespaceDefinition.setEndingOffset(
|
||||
last.getOffset() + last.getLength());
|
||||
namespaceDefinition.setEndingOffsetAndLineNumber(
|
||||
last.getOffset() + last.getLength(), last.getLineNumber());
|
||||
namespaceDefinition.exitScope( requestor );
|
||||
}
|
||||
else if( LT(1) == IToken.tASSIGN )
|
||||
|
@ -893,7 +895,7 @@ public abstract class Parser implements IParser
|
|||
{
|
||||
astFactory.createNamespaceAlias(
|
||||
scope, identifier.getImage(), duple, first.getOffset(),
|
||||
identifier.getOffset(), identifier.getEndOffset(), duple.getLastToken().getEndOffset() );
|
||||
first.getLineNumber(), identifier.getOffset(), identifier.getEndOffset(), identifier.getLineNumber(), duple.getLastToken().getEndOffset(), duple.getLastToken().getLineNumber() );
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
|
@ -930,7 +932,7 @@ public abstract class Parser implements IParser
|
|||
{
|
||||
IToken firstToken = LA(1);
|
||||
DeclarationWrapper sdw =
|
||||
new DeclarationWrapper(scope, firstToken.getOffset(), ownerTemplate);
|
||||
new DeclarationWrapper(scope, firstToken.getOffset(), firstToken.getLineNumber(), ownerTemplate);
|
||||
|
||||
setCompletionKeywords( Key.DECL_SPECIFIER_SEQUENCE );
|
||||
declSpecifierSeq(sdw, false, strategy == SimpleDeclarationStrategy.TRY_CONSTRUCTOR );
|
||||
|
@ -1025,8 +1027,8 @@ public abstract class Parser implements IParser
|
|||
while (i.hasNext())
|
||||
{
|
||||
IASTDeclaration declaration = (IASTDeclaration)i.next();
|
||||
((IASTOffsetableElement)declaration).setEndingOffset(
|
||||
lastToken.getEndOffset());
|
||||
((IASTOffsetableElement)declaration).setEndingOffsetAndLineNumber(
|
||||
lastToken.getEndOffset(), lastToken.getLineNumber());
|
||||
declaration.acceptElement( requestor );
|
||||
}
|
||||
}
|
||||
|
@ -1040,8 +1042,8 @@ public abstract class Parser implements IParser
|
|||
|
||||
handleFunctionBody((IASTScope)declaration,
|
||||
sdw.isInline() );
|
||||
((IASTOffsetableElement)declaration).setEndingOffset(
|
||||
lastToken.getEndOffset());
|
||||
((IASTOffsetableElement)declaration).setEndingOffsetAndLineNumber(
|
||||
lastToken.getEndOffset(), lastToken.getLineNumber());
|
||||
|
||||
declaration.exitScope( requestor );
|
||||
|
||||
|
@ -1060,7 +1062,7 @@ public abstract class Parser implements IParser
|
|||
sdw.getTypeSpecifier(),
|
||||
ownerTemplate,
|
||||
sdw.getStartingOffset(),
|
||||
lastToken.getEndOffset())
|
||||
sdw.getStartingLine(), lastToken.getEndOffset(), lastToken.getLineNumber())
|
||||
.acceptElement(requestor);
|
||||
}
|
||||
catch (Exception e1)
|
||||
|
@ -1160,7 +1162,7 @@ public abstract class Parser implements IParser
|
|||
IToken current = LA(1);
|
||||
|
||||
DeclarationWrapper sdw =
|
||||
new DeclarationWrapper(scope, current.getOffset(), null);
|
||||
new DeclarationWrapper(scope, current.getOffset(), current.getLineNumber(), null);
|
||||
declSpecifierSeq(sdw, true, false);
|
||||
if (sdw.getTypeSpecifier() == null
|
||||
&& sdw.getSimpleType()
|
||||
|
@ -1190,7 +1192,7 @@ public abstract class Parser implements IParser
|
|||
initDeclarator(sdw, SimpleDeclarationStrategy.TRY_FUNCTION );
|
||||
|
||||
if( lastToken != null )
|
||||
sdw.setEndingOffset( lastToken.getEndOffset() );
|
||||
sdw.setEndingOffsetAndLineNumber( lastToken.getEndOffset(), lastToken.getLineNumber() );
|
||||
|
||||
if (current == LA(1))
|
||||
throw backtrack;
|
||||
|
@ -1652,8 +1654,8 @@ public abstract class Parser implements IParser
|
|||
eck,
|
||||
d,
|
||||
t.getOffset(),
|
||||
d.getLastToken().getEndOffset(),
|
||||
isForewardDecl, sdw.isFriend() );
|
||||
t.getLineNumber(),
|
||||
d.getLastToken().getEndOffset(), d.getLastToken().getLineNumber(), isForewardDecl, sdw.isFriend() );
|
||||
}
|
||||
catch (ASTSemanticException e)
|
||||
{
|
||||
|
@ -2569,11 +2571,13 @@ public abstract class Parser implements IParser
|
|||
sdw.getScope(),
|
||||
((identifier == null) ? "" : identifier.getImage()),
|
||||
mark.getOffset(),
|
||||
((identifier == null)
|
||||
mark.getLineNumber(),
|
||||
((identifier == null)
|
||||
? mark.getOffset()
|
||||
: identifier.getOffset()),
|
||||
((identifier == null)? mark.getEndOffset()
|
||||
: identifier.getEndOffset()));
|
||||
((identifier == null)? mark.getEndOffset() : identifier.getEndOffset()),
|
||||
((identifier == null)? mark.getLineNumber() : identifier.getLineNumber())
|
||||
);
|
||||
}
|
||||
catch (ASTSemanticException e)
|
||||
{
|
||||
|
@ -2610,8 +2614,9 @@ public abstract class Parser implements IParser
|
|||
enumeration,
|
||||
enumeratorIdentifier.getImage(),
|
||||
enumeratorIdentifier.getOffset(),
|
||||
enumeratorIdentifier.getOffset(),
|
||||
enumeratorIdentifier.getEndOffset(), enumeratorIdentifier.getEndOffset(), initialValue);
|
||||
enumeratorIdentifier.getLineNumber(),
|
||||
enumeratorIdentifier.getOffset(), enumeratorIdentifier.getEndOffset(),
|
||||
enumeratorIdentifier.getLineNumber(), lastToken.getEndOffset(), lastToken.getLineNumber(), initialValue);
|
||||
}
|
||||
catch (ASTSemanticException e1)
|
||||
{
|
||||
|
@ -2633,8 +2638,8 @@ public abstract class Parser implements IParser
|
|||
enumeration,
|
||||
enumeratorIdentifier.getImage(),
|
||||
enumeratorIdentifier.getOffset(),
|
||||
enumeratorIdentifier.getOffset(),
|
||||
enumeratorIdentifier.getEndOffset(), enumeratorIdentifier.getEndOffset(), initialValue);
|
||||
enumeratorIdentifier.getLineNumber(),
|
||||
enumeratorIdentifier.getOffset(), enumeratorIdentifier.getEndOffset(), enumeratorIdentifier.getLineNumber(), lastToken.getEndOffset(), lastToken.getLineNumber(), initialValue);
|
||||
}
|
||||
catch (ASTSemanticException e1)
|
||||
{
|
||||
|
@ -2647,7 +2652,7 @@ public abstract class Parser implements IParser
|
|||
consume(IToken.tCOMMA);
|
||||
}
|
||||
IToken t = consume(IToken.tRBRACE);
|
||||
enumeration.setEndingOffset(t.getEndOffset());
|
||||
enumeration.setEndingOffsetAndLineNumber(t.getEndOffset(), t.getLineNumber());
|
||||
enumeration.acceptElement( requestor );
|
||||
sdw.setTypeSpecifier(enumeration);
|
||||
}
|
||||
|
@ -2724,8 +2729,10 @@ public abstract class Parser implements IParser
|
|||
nameType,
|
||||
access,
|
||||
classKey.getOffset(),
|
||||
duple == null ? classKey.getOffset() : duple.getFirstToken().getOffset(),
|
||||
duple == null ? classKey.getEndOffset() : duple.getFirstToken().getEndOffset() );
|
||||
classKey.getLineNumber(),
|
||||
duple == null ? classKey.getOffset() : duple.getFirstToken().getOffset(),
|
||||
duple == null ? classKey.getEndOffset() : duple.getFirstToken().getEndOffset(),
|
||||
duple == null ? classKey.getLineNumber() : duple.getFirstToken().getLineNumber() );
|
||||
}
|
||||
catch (ASTSemanticException e)
|
||||
{
|
||||
|
@ -2786,7 +2793,7 @@ public abstract class Parser implements IParser
|
|||
}
|
||||
// consume the }
|
||||
IToken lt = consume(IToken.tRBRACE);
|
||||
astClassSpecifier.setEndingOffset(lt.getEndOffset());
|
||||
astClassSpecifier.setEndingOffsetAndLineNumber(lt.getEndOffset(), lt.getLineNumber());
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -5139,7 +5146,7 @@ public abstract class Parser implements IParser
|
|||
}
|
||||
catch( BacktrackException bt )
|
||||
{
|
||||
Declarator d = new Declarator( new DeclarationWrapper(scope, 0, null) );
|
||||
Declarator d = new Declarator( new DeclarationWrapper(scope, mark.getOffset(), mark.getLineNumber(), null) );
|
||||
|
||||
if (LT(1) == IToken.tCOLONCOLON || LT(1) == IToken.tIDENTIFIER)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,6 @@ import java.util.Vector;
|
|||
|
||||
import org.eclipse.cdt.core.parser.BacktrackException;
|
||||
import org.eclipse.cdt.core.parser.EndOfFileException;
|
||||
import org.eclipse.cdt.core.parser.ILineOffsetReconciler;
|
||||
import org.eclipse.cdt.core.parser.IMacroDescriptor;
|
||||
import org.eclipse.cdt.core.parser.IParser;
|
||||
import org.eclipse.cdt.core.parser.IParserLogService;
|
||||
|
@ -62,7 +61,6 @@ public class Scanner implements IScanner {
|
|||
|
||||
protected final IParserLogService log;
|
||||
private final static String SCRATCH = "<scratch>";
|
||||
private Reader backupReader;
|
||||
private IProblemFactory problemFactory = new ScannerProblemFactory();
|
||||
private boolean initialContextInitialized = false;
|
||||
private final String filename;
|
||||
|
@ -96,7 +94,6 @@ public class Scanner implements IScanner {
|
|||
this.reader = reader;
|
||||
this.language = language;
|
||||
astFactory = ParserFactory.createASTFactory( mode, language );
|
||||
this.backupReader = reader;
|
||||
contextStack = new ContextStack( log );
|
||||
try {
|
||||
//this is a hack to get around a sudden EOF experience
|
||||
|
@ -330,7 +327,7 @@ public class Scanner implements IScanner {
|
|||
}
|
||||
|
||||
protected IToken newToken(int t, String i, IScannerContext c) {
|
||||
setCurrentToken(new Token(t, i, c));
|
||||
setCurrentToken(new Token(t, i, c, contextStack.getCurrentLineNumber()));
|
||||
return currentToken;
|
||||
}
|
||||
|
||||
|
@ -362,7 +359,7 @@ public class Scanner implements IScanner {
|
|||
return buffer.toString();
|
||||
}
|
||||
|
||||
protected void handleInclusion(String fileName, boolean useIncludePaths, int nameOffset, int beginOffset, int endOffset ) throws ScannerException {
|
||||
protected void handleInclusion(String fileName, boolean useIncludePaths, int beginOffset, int startLine, int nameOffset, int nameLine, int endOffset, int endLine ) throws ScannerException {
|
||||
|
||||
FileReader inclusionReader = null;
|
||||
String newPath = null;
|
||||
|
@ -417,13 +414,13 @@ public class Scanner implements IScanner {
|
|||
new FileReader(includeFile);
|
||||
} catch (FileNotFoundException fnf) {
|
||||
// the spec says that if finding in the local directory fails, search the include paths
|
||||
handleInclusion( fileName, true, nameOffset, beginOffset, endOffset );
|
||||
handleInclusion( fileName, true, beginOffset, startLine, nameOffset, nameLine, endOffset, endLine );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// the spec says that if finding in the local directory fails, search the include paths
|
||||
handleInclusion( fileName, true, nameOffset, beginOffset, endOffset );
|
||||
handleInclusion( fileName, true, beginOffset, startLine, nameOffset, nameLine, endOffset, endLine );
|
||||
}
|
||||
}
|
||||
if (inclusionReader != null) {
|
||||
|
@ -436,9 +433,9 @@ public class Scanner implements IScanner {
|
|||
newPath,
|
||||
!useIncludePaths,
|
||||
beginOffset,
|
||||
startLine,
|
||||
nameOffset,
|
||||
nameOffset + fileName.length(),
|
||||
endOffset);
|
||||
nameOffset + fileName.length(), nameLine, endOffset, endLine);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -976,7 +973,7 @@ public class Scanner implements IScanner {
|
|||
return newToken( IToken.tDOTSTAR, ".*", contextStack.getCurrentContext() );
|
||||
} else if( c == '.' ){
|
||||
if( getChar() == '.' )
|
||||
return newToken( IToken.tELLIPSIS, "..." );
|
||||
return newToken( IToken.tELLIPSIS, "...", contextStack.getCurrentContext() );
|
||||
else
|
||||
handleProblem( IProblem.SCANNER_BAD_FLOATING_POINT, null, beginOffset, false, true, true );
|
||||
} else {
|
||||
|
@ -1114,6 +1111,7 @@ public class Scanner implements IScanner {
|
|||
|
||||
} else if (c == '#') {
|
||||
int beginningOffset = contextStack.getCurrentContext().getOffset() - 1;
|
||||
int beginningLine = contextStack.getCurrentLineNumber();
|
||||
// lets prepare for a preprocessor statement
|
||||
StringBuffer buff = new StringBuffer();
|
||||
buff.append((char) c);
|
||||
|
@ -1157,7 +1155,7 @@ public class Scanner implements IScanner {
|
|||
continue;
|
||||
}
|
||||
|
||||
poundDefine(beginningOffset);
|
||||
poundDefine(beginningOffset, beginningLine);
|
||||
|
||||
c = getChar();
|
||||
continue;
|
||||
|
@ -1169,7 +1167,7 @@ public class Scanner implements IScanner {
|
|||
continue;
|
||||
}
|
||||
|
||||
poundInclude( beginningOffset );
|
||||
poundInclude( beginningOffset, beginningLine );
|
||||
|
||||
c = getChar();
|
||||
continue;
|
||||
|
@ -2084,11 +2082,13 @@ public class Scanner implements IScanner {
|
|||
return encounteredNewline;
|
||||
}
|
||||
|
||||
protected void poundInclude( int beginningOffset ) throws ScannerException {
|
||||
protected void poundInclude( int beginningOffset, int startLine ) throws ScannerException {
|
||||
|
||||
skipOverWhitespace();
|
||||
int baseOffset = lastContext.getOffset() - lastContext.undoStackSize();
|
||||
int nameLine = contextStack.getCurrentLineNumber();
|
||||
String includeLine = getRestOfPreprocessorLine();
|
||||
int endLine = contextStack.getCurrentLineNumber();
|
||||
StringBuffer fileName = new StringBuffer();
|
||||
boolean useIncludePath = true;
|
||||
int startOffset = baseOffset;
|
||||
|
@ -2177,9 +2177,9 @@ public class Scanner implements IScanner {
|
|||
"",
|
||||
!useIncludePath,
|
||||
beginningOffset,
|
||||
startLine,
|
||||
startOffset,
|
||||
startOffset + f.length(),
|
||||
endOffset);
|
||||
startOffset + f.length(), nameLine, endOffset, endLine);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -2193,7 +2193,7 @@ public class Scanner implements IScanner {
|
|||
}
|
||||
}
|
||||
else
|
||||
handleInclusion(f.trim(), useIncludePath, startOffset, beginningOffset, endOffset);
|
||||
handleInclusion(f.trim(), useIncludePath, beginningOffset, startLine, startOffset, nameLine, endOffset, endLine);
|
||||
}
|
||||
|
||||
protected static final Hashtable EMPTY_MAP = new Hashtable();
|
||||
|
@ -2288,11 +2288,12 @@ public class Scanner implements IScanner {
|
|||
}
|
||||
|
||||
|
||||
protected void poundDefine(int beginning) throws ScannerException {
|
||||
protected void poundDefine(int beginning, int beginningLine ) throws ScannerException {
|
||||
skipOverWhitespace();
|
||||
// definition
|
||||
String key = getNextIdentifier();
|
||||
int offset = contextStack.getCurrentContext().getOffset() - key.length() - contextStack.getCurrentContext().undoStackSize();
|
||||
int nameLine = contextStack.getCurrentLineNumber();
|
||||
|
||||
// store the previous definition to check against later
|
||||
IMacroDescriptor previousDefinition = getDefinition( key );
|
||||
|
@ -2413,7 +2414,7 @@ public class Scanner implements IScanner {
|
|||
|
||||
try
|
||||
{
|
||||
astFactory.createMacro( key, beginning, offset, offset + key.length(), contextStack.getCurrentContext().getOffset(), descriptor ).acceptElement( requestor );
|
||||
astFactory.createMacro( key, beginning, beginningLine, offset, offset + key.length(), nameLine, contextStack.getCurrentContext().getOffset(), contextStack.getCurrentLineNumber(), descriptor ).acceptElement( requestor );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -2754,15 +2755,6 @@ public class Scanner implements IScanner {
|
|||
astFactory = f;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.IScanner#getLineNumberForOffset(int)
|
||||
*/
|
||||
public int getLineNumberForOffset(int i)
|
||||
{
|
||||
ILineOffsetReconciler reconciler = ParserFactory.createLineOffsetReconciler( backupReader );
|
||||
return reconciler.getLineNumberForOffset(i);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.IScanner#setOffsetBoundary(int)
|
||||
*/
|
||||
|
|
|
@ -14,11 +14,12 @@ import org.eclipse.cdt.core.parser.IToken;
|
|||
|
||||
public class Token implements IToken {
|
||||
|
||||
public Token(int t, String i, IScannerContext context ) {
|
||||
public Token(int t, String i, IScannerContext context, int lineNumber ) {
|
||||
type = t;
|
||||
image = i;
|
||||
filename = context.getFilename();
|
||||
offset = context.getOffset() - image.length() - context.undoStackSize();
|
||||
this.lineNumber = lineNumber;
|
||||
macroOffset = context.getMacroOffset();
|
||||
macroLength = context.getMacroLength();
|
||||
|
||||
|
@ -61,6 +62,8 @@ public class Token implements IToken {
|
|||
}
|
||||
|
||||
private IToken next;
|
||||
|
||||
private int lineNumber;
|
||||
public IToken getNext() { return next; }
|
||||
public void setNext(IToken t) { next = t; }
|
||||
|
||||
|
@ -175,4 +178,11 @@ public class Token implements IToken {
|
|||
type = i;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.IToken#getLineNumber()
|
||||
*/
|
||||
public int getLineNumber() {
|
||||
return lineNumber;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,15 +19,15 @@ import org.eclipse.cdt.core.parser.ast.IASTInclusion;
|
|||
*/
|
||||
public class ASTInclusion implements IASTInclusion {
|
||||
|
||||
public ASTInclusion( String name, String fileName, boolean local, int startingOffset, int nameOffset, int nameEndOffset, int endOffset )
|
||||
public ASTInclusion( String name, String fileName, boolean local, int startingOffset, int startLine, int nameOffset, int nameEndOffset, int nameLine, int endOffset, int endLine )
|
||||
{
|
||||
this.name = name;
|
||||
this.fileName = fileName;
|
||||
this.local = local;
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startLine);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setEndingOffset(endOffset);
|
||||
setNameEndOffsetAndLineNumber(nameEndOffset, nameLine);
|
||||
setEndingOffsetAndLineNumber(endOffset, endLine);
|
||||
}
|
||||
|
||||
private int nameEndOffset;
|
||||
|
@ -81,16 +81,17 @@ public class ASTInclusion implements IASTInclusion {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.parser.ast.IOffsetableElementRW#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o) {
|
||||
startingOffset = o;
|
||||
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber) {
|
||||
startingOffset = offset;
|
||||
startingLineNumber = lineNumber;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.parser.ast.IOffsetableElementRW#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o) {
|
||||
endingOffset = o;
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber) {
|
||||
endingOffset = offset;
|
||||
endingLineNumber = lineNumber;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -149,8 +150,29 @@ public class ASTInclusion implements IASTInclusion {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
nameEndOffset = o;
|
||||
nameEndOffset = offset;
|
||||
nameLineNumber = lineNumber;
|
||||
}
|
||||
|
||||
private int startingLineNumber, endingLineNumber, nameLineNumber;
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return startingLineNumber;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return endingLineNumber;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return nameLineNumber;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,13 +26,13 @@ public class ASTMacro implements IASTMacro {
|
|||
private final String name;
|
||||
private final IMacroDescriptor innerMacro;
|
||||
|
||||
public ASTMacro( String name, int start, int end, int nameBeg, int nameEnd, IMacroDescriptor info )
|
||||
public ASTMacro( String name, IMacroDescriptor info, int start, int startLine, int nameBeg, int nameEnd, int nameLine, int end, int endLine )
|
||||
{
|
||||
this.name =name;
|
||||
setStartingOffset(start);
|
||||
setStartingOffsetAndLineNumber(start, startLine);
|
||||
setNameOffset(nameBeg);
|
||||
setNameEndOffset(nameEnd);
|
||||
setEndingOffset(end);
|
||||
setNameEndOffsetAndLineNumber(nameEnd, nameLine);
|
||||
setEndingOffsetAndLineNumber(end, endLine);
|
||||
innerMacro = info;
|
||||
}
|
||||
|
||||
|
@ -47,14 +47,16 @@ public class ASTMacro implements IASTMacro {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IOffsetableElementRW#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o) {
|
||||
startingOffset = o;
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber) {
|
||||
startingOffset = offset;
|
||||
startingLineNumber = lineNumber;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IOffsetableElementRW#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o) {
|
||||
endingOffset = o;
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber) {
|
||||
endingOffset = offset;
|
||||
endingLineNumber = lineNumber;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IOffsetableElementRW#setNameOffset(int)
|
||||
|
@ -117,9 +119,10 @@ public class ASTMacro implements IASTMacro {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
nameEndOffset = o;
|
||||
nameEndOffset = offset;
|
||||
nameLineNumber = lineNumber;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.IMacroDescriptor#getMacroType()
|
||||
|
@ -157,4 +160,24 @@ public class ASTMacro implements IASTMacro {
|
|||
public boolean compatible(IMacroDescriptor descriptor) {
|
||||
return innerMacro.compatible(descriptor);
|
||||
}
|
||||
|
||||
private int startingLineNumber, endingLineNumber, nameLineNumber;
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return startingLineNumber;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return endingLineNumber;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return nameLineNumber;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,16 +34,16 @@ public class BaseASTFactory {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createMacro(java.lang.String, int, int, int)
|
||||
*/
|
||||
public IASTMacro createMacro(String name, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset, IMacroDescriptor info) {
|
||||
IASTMacro m = new ASTMacro( name, startingOffset, endingOffset, nameOffset, nameEndOffset, info );
|
||||
public IASTMacro createMacro(String name, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endingLine, IMacroDescriptor info) {
|
||||
IASTMacro m = new ASTMacro( name, info, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, endingOffset, endingLine );
|
||||
return m;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @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 nameOffset, int nameEndOffset, int endingOffset) {
|
||||
IASTInclusion inclusion = new ASTInclusion( name, fileName, local, startingOffset, nameOffset, nameEndOffset, endingOffset );
|
||||
public IASTInclusion createInclusion(String name, String fileName, boolean local, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endingLine) {
|
||||
IASTInclusion inclusion = new ASTInclusion( name, fileName, local, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, endingOffset, endingLine );
|
||||
return inclusion;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ public class NamedOffsets extends Offsets {
|
|||
|
||||
private int nameEndOffset = 0;
|
||||
private int nameOffset = 0;
|
||||
private int nameLineNumber = 0;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getElementNameOffset()
|
||||
|
@ -30,8 +31,8 @@ public class NamedOffsets extends Offsets {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameOffset(int)
|
||||
*/
|
||||
public void setNameOffset(int o) {
|
||||
nameOffset = o;
|
||||
public void setNameOffset(int offset) {
|
||||
nameOffset = offset;
|
||||
}
|
||||
|
||||
public int getNameEndOffset()
|
||||
|
@ -39,9 +40,16 @@ public class NamedOffsets extends Offsets {
|
|||
return nameEndOffset;
|
||||
}
|
||||
|
||||
public void setNameEndOffset( int offset )
|
||||
public void setNameEndOffsetAndLineNumber( int offset, int lineNumber )
|
||||
{
|
||||
nameEndOffset = offset;
|
||||
nameLineNumber = lineNumber;
|
||||
}
|
||||
|
||||
public int getNameLineNumber()
|
||||
{
|
||||
return nameLineNumber;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -17,15 +17,18 @@ package org.eclipse.cdt.internal.core.parser.ast;
|
|||
public class Offsets {
|
||||
|
||||
protected int startingOffset = 0;
|
||||
|
||||
protected int endingOffset = 0;
|
||||
private int startingLine;
|
||||
private int endingLine;
|
||||
|
||||
public void setStartingOffset(int o) {
|
||||
startingOffset = o;
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber) {
|
||||
startingOffset = offset;
|
||||
startingLine = lineNumber;
|
||||
}
|
||||
|
||||
public void setEndingOffset(int o) {
|
||||
endingOffset = o;
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber) {
|
||||
endingOffset = offset;
|
||||
endingLine = lineNumber;
|
||||
}
|
||||
|
||||
public int getStartingOffset() {
|
||||
|
@ -36,4 +39,18 @@ public class Offsets {
|
|||
return endingOffset;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return startingLine;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return endingLine;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,12 +26,12 @@ public class ASTASMDefinition extends ASTAnonymousDeclaration implements IASTASM
|
|||
/**
|
||||
*
|
||||
*/
|
||||
public ASTASMDefinition( IContainerSymbol scope, String assembly, int first, int last )
|
||||
public ASTASMDefinition( IContainerSymbol scope, String assembly, int first, int firstLine, int last , int lastLine )
|
||||
{
|
||||
super( scope );
|
||||
this.assembly = assembly;
|
||||
setStartingOffset(first);
|
||||
setEndingOffset(last);
|
||||
setStartingOffsetAndLineNumber(first, firstLine);
|
||||
setEndingOffsetAndLineNumber(last, lastLine);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTASMDefinition#getBody()
|
||||
|
@ -43,16 +43,16 @@ public class ASTASMDefinition extends ASTAnonymousDeclaration implements IASTASM
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingOffset()
|
||||
|
@ -95,4 +95,19 @@ public class ASTASMDefinition extends ASTAnonymousDeclaration implements IASTASM
|
|||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,13 +32,13 @@ public class ASTAbstractTypeSpecifierDeclaration
|
|||
/**
|
||||
* @param ownerScope
|
||||
*/
|
||||
public ASTAbstractTypeSpecifierDeclaration(IContainerSymbol ownerScope, IASTTypeSpecifier typeSpecifier, IASTTemplate ownerTemplate, int startingOffset, int endingOffset )
|
||||
public ASTAbstractTypeSpecifierDeclaration(IContainerSymbol ownerScope, IASTTypeSpecifier typeSpecifier, IASTTemplate ownerTemplate, int startingOffset, int startingLine, int endingOffset, int endingLine )
|
||||
{
|
||||
super(ownerScope);
|
||||
this.typeSpec = typeSpecifier;
|
||||
this.ownerTemplate = ownerTemplate;
|
||||
setStartingOffset(startingOffset);
|
||||
setEndingOffset(endingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setEndingOffsetAndLineNumber(endingOffset, endingLine);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -89,17 +89,17 @@ public class ASTAbstractTypeSpecifierDeclaration
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -117,4 +117,19 @@ public class ASTAbstractTypeSpecifierDeclaration
|
|||
{
|
||||
return offsets.getEndingOffset();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -92,15 +92,15 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
|||
/**
|
||||
* @param symbol
|
||||
*/
|
||||
public ASTClassSpecifier(ISymbol symbol, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int nameOffset, int nameEndOffset, List references )
|
||||
public ASTClassSpecifier(ISymbol symbol, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, List references )
|
||||
{
|
||||
super(symbol);
|
||||
classKind = kind;
|
||||
classNameType = type;
|
||||
currentVisibility = access;
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setNameEndOffsetAndLineNumber(nameEndOffset, nameLine);
|
||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
|
||||
this.references = new ASTReferenceStore( references );
|
||||
}
|
||||
|
@ -205,16 +205,16 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingOffset()
|
||||
|
@ -254,9 +254,9 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
public Iterator getDeclarations()
|
||||
|
@ -268,4 +268,23 @@ public class ASTClassSpecifier extends ASTScope implements IASTClassSpecifier
|
|||
declarations.add(declaration);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,14 +38,14 @@ public class ASTElaboratedTypeSpecifier extends ASTSymbol implements IASTElabora
|
|||
* @param startingOffset
|
||||
* @param endOffset
|
||||
*/
|
||||
public ASTElaboratedTypeSpecifier(ISymbol checkSymbol, ASTClassKind kind, int startingOffset, int nameOffset, int nameEndOffset, int endOffset, List references, boolean isDecl )
|
||||
public ASTElaboratedTypeSpecifier(ISymbol checkSymbol, ASTClassKind kind, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endOffset, int endingLine, List references, boolean isDecl )
|
||||
{
|
||||
super( checkSymbol );
|
||||
this.kind = kind;
|
||||
setStartingOffset( startingOffset );
|
||||
setStartingOffsetAndLineNumber( startingOffset, startingLine );
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setEndingOffset( endOffset );
|
||||
setNameEndOffsetAndLineNumber(nameEndOffset, nameLine);
|
||||
setEndingOffsetAndLineNumber( endOffset, endingLine );
|
||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), checkSymbol.getName() );
|
||||
store = new ASTReferenceStore( references );
|
||||
isForwardDeclaration = isDecl;
|
||||
|
@ -75,16 +75,16 @@ public class ASTElaboratedTypeSpecifier extends ASTSymbol implements IASTElabora
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset( o );
|
||||
offsets.setEndingOffsetAndLineNumber( offset, lineNumber );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingOffset()
|
||||
|
@ -163,8 +163,28 @@ public class ASTElaboratedTypeSpecifier extends ASTSymbol implements IASTElabora
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,12 +34,12 @@ public class ASTEnumerationSpecifier
|
|||
/**
|
||||
* @param symbol
|
||||
*/
|
||||
public ASTEnumerationSpecifier(ISymbol symbol, int startingOffset, int nameOffset, int nameEndOffset )
|
||||
public ASTEnumerationSpecifier(ISymbol symbol, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine )
|
||||
{
|
||||
super(symbol);
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setNameEndOffsetAndLineNumber(nameEndOffset, nameLine);
|
||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
|
||||
}
|
||||
|
||||
|
@ -115,16 +115,16 @@ public class ASTEnumerationSpecifier
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset( o );
|
||||
offsets.setStartingOffsetAndLineNumber( offset, lineNumber );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset( o );
|
||||
offsets.setEndingOffsetAndLineNumber( offset, lineNumber );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingOffset()
|
||||
|
@ -151,8 +151,28 @@ public class ASTEnumerationSpecifier
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,13 +32,13 @@ public class ASTEnumerator extends ASTSymbol implements IASTEnumerator
|
|||
* @param endingOffset
|
||||
* @param initialValue
|
||||
*/
|
||||
public ASTEnumerator(ISymbol enumeratorSymbol, IASTEnumerationSpecifier owner, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset, IASTExpression initialValue)
|
||||
public ASTEnumerator(ISymbol enumeratorSymbol, IASTEnumerationSpecifier owner, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endingLine, IASTExpression initialValue)
|
||||
{
|
||||
super( enumeratorSymbol );
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset( nameEndOffset );
|
||||
setEndingOffset( endingOffset );
|
||||
setNameEndOffsetAndLineNumber( nameEndOffset, nameLine );
|
||||
setEndingOffsetAndLineNumber( endingOffset, endingLine );
|
||||
this.initialValue = initialValue;
|
||||
this.owner = owner;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class ASTEnumerator extends ASTSymbol implements IASTEnumerator
|
|||
*/
|
||||
public void setNameOffset(int o)
|
||||
{
|
||||
setStartingOffset(o);
|
||||
offsets.setNameOffset( o );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate#acceptElement(org.eclipse.cdt.core.parser.ISourceElementRequestor)
|
||||
|
@ -98,16 +98,16 @@ public class ASTEnumerator extends ASTSymbol implements IASTEnumerator
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingOffset()
|
||||
|
@ -134,8 +134,28 @@ public class ASTEnumerator extends ASTSymbol implements IASTEnumerator
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,9 +37,9 @@ public class ASTField extends ASTVariable implements IASTField
|
|||
* @param references
|
||||
* @param 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)
|
||||
public ASTField(ISymbol newSymbol, IASTAbstractDeclaration abstractDeclaration, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, List references, boolean previouslyDeclared, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
||||
{
|
||||
super( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, nameEndOffset, references, constructorExpression, previouslyDeclared );
|
||||
super( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, references, constructorExpression, previouslyDeclared );
|
||||
this.visibility = visibility;
|
||||
|
||||
}
|
||||
|
|
|
@ -54,15 +54,15 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
|||
* @param ownerTemplate
|
||||
* @param references
|
||||
*/
|
||||
public ASTFunction(IParameterizedSymbol symbol, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, int startOffset, int nameOffset, IASTTemplate ownerTemplate, List references, boolean previouslyDeclared, boolean hasFunctionTryBlock )
|
||||
public ASTFunction(IParameterizedSymbol symbol, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, int startOffset, int startingLine, int nameOffset, int nameLine, IASTTemplate ownerTemplate, List references, boolean previouslyDeclared, boolean hasFunctionTryBlock )
|
||||
{
|
||||
super( symbol );
|
||||
this.parameters = parameters;
|
||||
this.returnType = returnType;
|
||||
this.exception = exception;
|
||||
setStartingOffset(startOffset);
|
||||
setStartingOffsetAndLineNumber(startOffset, startingLine);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setNameEndOffsetAndLineNumber(nameEndOffset, nameLine);
|
||||
this.ownerTemplate = ownerTemplate;
|
||||
this.references = new ASTReferenceStore( references );
|
||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), symbol.getName() );
|
||||
|
@ -166,16 +166,16 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingOffset()
|
||||
|
@ -296,9 +296,9 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
|
||||
|
@ -336,4 +336,24 @@ public class ASTFunction extends ASTScope implements IASTFunction
|
|||
public boolean takesVarArgs() {
|
||||
return ((IParameterizedSymbol)getSymbol()).hasVariableArgs();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,11 +29,11 @@ public class ASTLinkageSpecification extends ASTAnonymousDeclaration implements
|
|||
/**
|
||||
*
|
||||
*/
|
||||
public ASTLinkageSpecification( IContainerSymbol scope, String linkageString, int startingOffset )
|
||||
public ASTLinkageSpecification( IContainerSymbol scope, String linkageString, int startingOffset, int startingLine )
|
||||
{
|
||||
super( scope );
|
||||
this.linkageString = linkageString;
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTLinkageSpecification#getLinkageString()
|
||||
|
@ -52,16 +52,16 @@ public class ASTLinkageSpecification extends ASTAnonymousDeclaration implements
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingOffset()
|
||||
|
@ -112,4 +112,19 @@ public class ASTLinkageSpecification extends ASTAnonymousDeclaration implements
|
|||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ public class ASTMethod extends ASTFunction implements IASTMethod
|
|||
* @param ownerTemplate
|
||||
* @param references
|
||||
*/
|
||||
public ASTMethod(IParameterizedSymbol symbol, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, int startOffset, int nameOffset, IASTTemplate ownerTemplate, List references, boolean previouslyDeclared,
|
||||
boolean isConstructor, boolean isDestructor, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean hasFunctionTryBlock )
|
||||
public ASTMethod(IParameterizedSymbol symbol, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, int startOffset, int startLine, int nameOffset, int nameEndOffset, int nameLine, IASTTemplate ownerTemplate,
|
||||
List references, boolean previouslyDeclared, boolean isConstructor, boolean isDestructor, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean hasFunctionTryBlock )
|
||||
{
|
||||
super(
|
||||
symbol,
|
||||
|
@ -55,9 +55,9 @@ public class ASTMethod extends ASTFunction implements IASTMethod
|
|||
returnType,
|
||||
exception,
|
||||
startOffset,
|
||||
startLine,
|
||||
nameOffset,
|
||||
ownerTemplate,
|
||||
references, previouslyDeclared, hasFunctionTryBlock );
|
||||
nameLine, ownerTemplate, references, previouslyDeclared, hasFunctionTryBlock );
|
||||
this.visibility = visibility;
|
||||
this.isConstructor = isConstructor;
|
||||
this.isDestructor = isDestructor;
|
||||
|
|
|
@ -35,15 +35,15 @@ public class ASTNamespaceAlias extends ASTSymbol implements IASTNamespaceAlias
|
|||
* @param nameOffset
|
||||
* @param endOffset
|
||||
*/
|
||||
public ASTNamespaceAlias(ISymbol s, String alias, IASTNamespaceDefinition namespaceDefinition, int startingOffset, int nameOffset, int nameEndOffset, int endOffset, List references)
|
||||
public ASTNamespaceAlias(ISymbol s, String alias, IASTNamespaceDefinition namespaceDefinition, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endOffset, int endingLine, List references)
|
||||
{
|
||||
super( s );
|
||||
this.alias = alias;
|
||||
this.namespace = namespaceDefinition;
|
||||
setStartingOffset(startingOffset);
|
||||
setEndingOffset(endOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setEndingOffsetAndLineNumber(endOffset, endingLine);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setNameEndOffsetAndLineNumber(nameEndOffset, nameEndOffset);
|
||||
store = new ASTReferenceStore( references);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -105,16 +105,16 @@ public class ASTNamespaceAlias extends ASTSymbol implements IASTNamespaceAlias
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingOffset()
|
||||
|
@ -141,8 +141,28 @@ public class ASTNamespaceAlias extends ASTSymbol implements IASTNamespaceAlias
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public class ASTNamespaceDefinition
|
|||
implements IASTNamespaceDefinition
|
||||
{
|
||||
|
||||
private NamedOffsets namedOffsets = new NamedOffsets();
|
||||
private NamedOffsets offsets = new NamedOffsets();
|
||||
private final ASTQualifiedNamedElement qualifiedName;
|
||||
private List declarations = new ArrayList();
|
||||
|
||||
|
@ -39,12 +39,12 @@ public class ASTNamespaceDefinition
|
|||
* @param startingOffset
|
||||
* @param nameOffset
|
||||
*/
|
||||
public ASTNamespaceDefinition(ISymbol namespaceSymbol, int startingOffset, int nameOffset, int nameEndOffset )
|
||||
public ASTNamespaceDefinition(ISymbol namespaceSymbol, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine )
|
||||
{
|
||||
super( namespaceSymbol );
|
||||
setStartingOffset( startingOffset );
|
||||
setStartingOffsetAndLineNumber( startingOffset, startingLine );
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset( nameEndOffset );
|
||||
setNameEndOffsetAndLineNumber( nameEndOffset, nameLine );
|
||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), namespaceSymbol.getName() );
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ public class ASTNamespaceDefinition
|
|||
*/
|
||||
public int getNameOffset()
|
||||
{
|
||||
return namedOffsets.getNameOffset();
|
||||
return offsets.getNameOffset();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -69,23 +69,23 @@ public class ASTNamespaceDefinition
|
|||
*/
|
||||
public void setNameOffset(int o)
|
||||
{
|
||||
namedOffsets.setNameOffset( o );
|
||||
offsets.setNameOffset( o );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
namedOffsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
namedOffsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -93,7 +93,7 @@ public class ASTNamespaceDefinition
|
|||
*/
|
||||
public int getStartingOffset()
|
||||
{
|
||||
return namedOffsets.getStartingOffset();
|
||||
return offsets.getStartingOffset();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -101,7 +101,7 @@ public class ASTNamespaceDefinition
|
|||
*/
|
||||
public int getEndingOffset()
|
||||
{
|
||||
return namedOffsets.getEndingOffset();
|
||||
return offsets.getEndingOffset();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -155,14 +155,14 @@ public class ASTNamespaceDefinition
|
|||
*/
|
||||
public int getNameEndOffset()
|
||||
{
|
||||
return namedOffsets.getNameEndOffset();
|
||||
return offsets.getNameEndOffset();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
namedOffsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
public Iterator getDeclarations()
|
||||
|
@ -173,5 +173,23 @@ public class ASTNamespaceDefinition
|
|||
{
|
||||
declarations.add(declaration);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,16 +40,16 @@ public class ASTParameterDeclaration extends ASTSymbol implements IASTParameterD
|
|||
* @param parameterName
|
||||
* @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, int nameEndOffset )
|
||||
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 startingLine, int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endingLine )
|
||||
{
|
||||
super( symbol );
|
||||
abstractDeclaration = new ASTAbstractDeclaration( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp );
|
||||
this.parameterName = parameterName;
|
||||
this.initializerClause = initializerClause;
|
||||
setStartingOffset(startingOffset);
|
||||
setEndingOffset(endingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setEndingOffsetAndLineNumber(endingOffset, endingLine);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset( nameEndOffset );
|
||||
setNameEndOffsetAndLineNumber( nameEndOffset, nameLine );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration#getName()
|
||||
|
@ -151,16 +151,16 @@ public class ASTParameterDeclaration extends ASTSymbol implements IASTParameterD
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -189,9 +189,28 @@ public class ASTParameterDeclaration extends ASTSymbol implements IASTParameterD
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,14 +65,14 @@ public class ASTTemplateDeclaration extends ASTNode implements IASTTemplateDecla
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
@ -121,4 +121,20 @@ public class ASTTemplateDeclaration extends ASTNode implements IASTTemplateDecla
|
|||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -47,14 +47,14 @@ public class ASTTemplateInstantiation extends ASTNode implements IASTTemplateIns
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
@ -103,4 +103,18 @@ public class ASTTemplateInstantiation extends ASTNode implements IASTTemplateIns
|
|||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,14 +47,14 @@ public class ASTTemplateSpecialization extends ASTNode implements IASTTemplateSp
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
@ -103,4 +103,18 @@ public class ASTTemplateSpecialization extends ASTNode implements IASTTemplateSp
|
|||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,15 +38,15 @@ public class ASTTypedef extends ASTSymbol implements IASTTypedefDeclaration
|
|||
* @param nameOffset
|
||||
* @param references
|
||||
*/
|
||||
public ASTTypedef(ISymbol newSymbol, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, int nameEndOffset, List references)
|
||||
public ASTTypedef(ISymbol newSymbol, IASTAbstractDeclaration mapping, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, List references)
|
||||
{
|
||||
super( newSymbol );
|
||||
this.mapping = mapping;
|
||||
this.referenceStore = new ASTReferenceStore( references );
|
||||
this.qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), newSymbol.getName());
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset( nameEndOffset );
|
||||
setNameEndOffsetAndLineNumber( nameEndOffset, nameLine );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -115,17 +115,17 @@ public class ASTTypedef extends ASTSymbol implements IASTTypedefDeclaration
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -162,9 +162,27 @@ public class ASTTypedef extends ASTSymbol implements IASTTypedefDeclaration
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,13 +34,13 @@ public class ASTUsingDeclaration extends ASTNode implements IASTUsingDeclaration
|
|||
/**
|
||||
*
|
||||
*/
|
||||
public ASTUsingDeclaration( IASTScope ownerScope, IASTDeclaration declaration, boolean isTypeName, int startingOffset, int endingOffset, List references )
|
||||
public ASTUsingDeclaration( IASTScope ownerScope, IASTDeclaration declaration, boolean isTypeName, int startingOffset, int startingLine, int endingOffset, int endingLine, List references )
|
||||
{
|
||||
this.ownerScope = ownerScope;
|
||||
this.isTypeName = isTypeName;
|
||||
this.declaration = declaration;
|
||||
setStartingOffset(startingOffset);
|
||||
setEndingOffset(endingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setEndingOffsetAndLineNumber(endingOffset, endingLine);
|
||||
delegate = new ASTReferenceStore( references );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -60,16 +60,16 @@ public class ASTUsingDeclaration extends ASTNode implements IASTUsingDeclaration
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingOffset()
|
||||
|
@ -126,4 +126,18 @@ public class ASTUsingDeclaration extends ASTNode implements IASTUsingDeclaration
|
|||
{
|
||||
return declaration;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,13 +34,13 @@ public class ASTUsingDirective extends ASTAnonymousDeclaration implements IASTUs
|
|||
* @param endingOffset
|
||||
*/
|
||||
//public ASTUsingDirective(IContainerSymbol ownerSymbol, IASTNamespaceDefinition namespaceDefinition, int startingOffset, int endingOffset, List references )
|
||||
public ASTUsingDirective(IContainerSymbol ownerSymbol, IUsingDirectiveSymbol usingDirective, int startingOffset, int endingOffset, List references )
|
||||
public ASTUsingDirective(IContainerSymbol ownerSymbol, IUsingDirectiveSymbol usingDirective, int startingOffset, int startingLine, int endingOffset, int endingLine, List references )
|
||||
{
|
||||
super( ownerSymbol );
|
||||
//namespace = namespaceDefinition;
|
||||
using = usingDirective;
|
||||
setStartingOffset(startingOffset);
|
||||
setEndingOffset(endingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setEndingOffsetAndLineNumber(endingOffset, endingLine);
|
||||
referenceDelegate = new ASTReferenceStore( references );
|
||||
}
|
||||
|
||||
|
@ -63,16 +63,16 @@ public class ASTUsingDirective extends ASTAnonymousDeclaration implements IASTUs
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset( o );
|
||||
offsets.setEndingOffsetAndLineNumber( offset, lineNumber );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -127,4 +127,17 @@ public class ASTUsingDirective extends ASTAnonymousDeclaration implements IASTUs
|
|||
return (IASTNamespaceDefinition)namespaceSymbol.getASTExtension().getPrimaryDeclaration();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,16 +45,16 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
|||
* @param nameOffset
|
||||
* @param references
|
||||
*/
|
||||
public ASTVariable(ISymbol newSymbol, IASTAbstractDeclaration abstractDeclaration, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, int startingOffset, int nameOffset, int nameEndOffset, List references, IASTExpression constructorExpression, boolean previouslyDeclared )
|
||||
public ASTVariable(ISymbol newSymbol, IASTAbstractDeclaration abstractDeclaration, IASTInitializerClause initializerClause, IASTExpression bitfieldExpression, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, List references, IASTExpression constructorExpression, boolean previouslyDeclared )
|
||||
{
|
||||
super( newSymbol );
|
||||
this.abstractDeclaration = abstractDeclaration;
|
||||
this.initializerClause = initializerClause;
|
||||
this.bitfieldExpression = bitfieldExpression;
|
||||
this.constructorExpression = constructorExpression;
|
||||
setStartingOffset( startingOffset );
|
||||
setStartingOffsetAndLineNumber( startingOffset, startingLine );
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setNameEndOffsetAndLineNumber(nameEndOffset, nameLine);
|
||||
referenceDelegate = new ASTReferenceStore( references );
|
||||
qualifiedName = new ASTQualifiedNamedElement( getOwnerScope(), newSymbol.getName() );
|
||||
}
|
||||
|
@ -193,16 +193,16 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingOffset()
|
||||
|
@ -229,9 +229,9 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTVariable#getConstructorExpression()
|
||||
|
@ -240,5 +240,23 @@ public class ASTVariable extends ASTSymbol implements IASTVariable
|
|||
{
|
||||
return constructorExpression;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -320,7 +320,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
IASTScope scope,
|
||||
ITokenDuple duple,
|
||||
int startingOffset,
|
||||
int endingOffset)
|
||||
int startingLine, int endingOffset, int endingLine)
|
||||
throws ASTSemanticException
|
||||
{
|
||||
List references = new ArrayList();
|
||||
|
@ -334,7 +334,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
throw new ASTSemanticException();
|
||||
}
|
||||
|
||||
IASTUsingDirective astUD = new ASTUsingDirective( scopeToSymbol(scope), usingDirective, startingOffset, endingOffset, references );
|
||||
IASTUsingDirective astUD = new ASTUsingDirective( scopeToSymbol(scope), usingDirective, startingOffset, startingLine, endingOffset, endingLine, references );
|
||||
return astUD;
|
||||
}
|
||||
|
||||
|
@ -370,7 +370,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
boolean isTypeName,
|
||||
ITokenDuple name,
|
||||
int startingOffset,
|
||||
int endingOffset) throws ASTSemanticException
|
||||
int startingLine, int endingOffset, int endingLine) throws ASTSemanticException
|
||||
{
|
||||
List references = new ArrayList();
|
||||
ISymbol symbol = lookupQualifiedName( scopeToSymbol(scope), name, references, true );
|
||||
|
@ -384,7 +384,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
throw new ASTSemanticException();
|
||||
}
|
||||
return new ASTUsingDeclaration( scope,
|
||||
symbol.getASTExtension().getPrimaryDeclaration(), isTypeName, startingOffset, endingOffset, references );
|
||||
symbol.getASTExtension().getPrimaryDeclaration(), isTypeName, startingOffset, startingLine, endingOffset, endingLine, references );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createASMDefinition(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, int, int)
|
||||
|
@ -392,11 +392,11 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
public IASTASMDefinition createASMDefinition(
|
||||
IASTScope scope,
|
||||
String assembly,
|
||||
int first,
|
||||
int last)
|
||||
int startingOffset,
|
||||
int startingLine, int endingOffset, int endingLine)
|
||||
{
|
||||
|
||||
return new ASTASMDefinition( scopeToSymbol(scope), assembly, first, last );
|
||||
return new ASTASMDefinition( scopeToSymbol(scope), assembly, startingOffset, startingLine, endingOffset, endingLine);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createNamespaceDefinition(org.eclipse.cdt.core.parser.ast.IASTScope, java.lang.String, int, int)
|
||||
|
@ -405,7 +405,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
IASTScope scope,
|
||||
String identifier,
|
||||
int startingOffset,
|
||||
int nameOffset, int nameEndOffset) throws ASTSemanticException
|
||||
int startingLine, int nameOffset, int nameEndOffset, int nameLineNumber) throws ASTSemanticException
|
||||
{
|
||||
|
||||
IContainerSymbol pstScope = scopeToSymbol(scope);
|
||||
|
@ -448,7 +448,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
}
|
||||
}
|
||||
|
||||
ASTNamespaceDefinition namespaceDef = new ASTNamespaceDefinition( namespaceSymbol, startingOffset, nameOffset, nameEndOffset );
|
||||
ASTNamespaceDefinition namespaceDef = new ASTNamespaceDefinition( namespaceSymbol, startingOffset, startingLine, nameOffset, nameEndOffset, nameLineNumber);
|
||||
try
|
||||
{
|
||||
attachSymbolExtension( namespaceSymbol, namespaceDef );
|
||||
|
@ -513,9 +513,9 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
public IASTLinkageSpecification createLinkageSpecification(
|
||||
IASTScope scope,
|
||||
String spec,
|
||||
int startingOffset)
|
||||
int startingOffset, int startingLine)
|
||||
{
|
||||
return new ASTLinkageSpecification( scopeToSymbol( scope ), spec, startingOffset );
|
||||
return new ASTLinkageSpecification( scopeToSymbol( scope ), spec, startingOffset, startingLine );
|
||||
}
|
||||
/* (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.ASTClassKind, org.eclipse.cdt.core.parser.ast.IASTClassSpecifier.ClassNameType, org.eclipse.cdt.core.parser.ast.ASTAccessVisibility, org.eclipse.cdt.core.parser.ast.IASTTemplate, int, int)
|
||||
|
@ -527,7 +527,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
ClassNameType type,
|
||||
ASTAccessVisibility access,
|
||||
int startingOffset,
|
||||
int nameOffset, int nameEndOffset) throws ASTSemanticException
|
||||
int startingLine, int nameOffset, int nameEndOffset, int nameLine) throws ASTSemanticException
|
||||
{
|
||||
IContainerSymbol currentScopeSymbol = scopeToSymbol(scope);
|
||||
TypeInfo.eType pstType = classKindToTypeInfo(kind);
|
||||
|
@ -581,7 +581,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
throw new ASTSemanticException();
|
||||
}
|
||||
|
||||
ASTClassSpecifier classSpecifier = new ASTClassSpecifier( newSymbol, kind, type, access, startingOffset, nameOffset, nameEndOffset, references );
|
||||
ASTClassSpecifier classSpecifier = new ASTClassSpecifier( newSymbol, kind, type, access, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, references );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension(newSymbol, classSpecifier );
|
||||
|
@ -735,7 +735,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
IASTScope scope,
|
||||
String name,
|
||||
int startingOffset,
|
||||
int nameOffset, int nameEndOffset) throws ASTSemanticException
|
||||
int startingLine, int nameOffset, int nameEndOffset, int nameLine) throws ASTSemanticException
|
||||
{
|
||||
IContainerSymbol containerSymbol = scopeToSymbol(scope);
|
||||
TypeInfo.eType pstType = TypeInfo.t_enumeration;
|
||||
|
@ -750,7 +750,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
throw new ASTSemanticException();
|
||||
}
|
||||
|
||||
ASTEnumerationSpecifier enumSpecifier = new ASTEnumerationSpecifier( classSymbol, startingOffset, nameOffset, nameEndOffset );
|
||||
ASTEnumerationSpecifier enumSpecifier = new ASTEnumerationSpecifier( classSymbol, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine );
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -769,8 +769,8 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
IASTEnumerationSpecifier enumeration,
|
||||
String string,
|
||||
int startingOffset,
|
||||
int nameOffset,
|
||||
int nameEndOffset, int endingOffset, IASTExpression initialValue) throws ASTSemanticException
|
||||
int startingLine,
|
||||
int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endLine, IASTExpression initialValue) throws ASTSemanticException
|
||||
{
|
||||
IContainerSymbol enumerationSymbol = (IContainerSymbol)((ISymbolOwner)enumeration).getSymbol();
|
||||
|
||||
|
@ -783,7 +783,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
{
|
||||
throw new ASTSemanticException();
|
||||
}
|
||||
ASTEnumerator enumerator = new ASTEnumerator( enumeratorSymbol, enumeration, startingOffset, nameOffset, nameEndOffset, endingOffset, initialValue );
|
||||
ASTEnumerator enumerator = new ASTEnumerator( enumeratorSymbol, enumeration, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, endingOffset, endLine, initialValue );
|
||||
((ASTEnumerationSpecifier)enumeration).addEnumerator( enumerator );
|
||||
try
|
||||
{
|
||||
|
@ -1596,16 +1596,16 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
boolean isFriend,
|
||||
boolean isStatic,
|
||||
int startOffset,
|
||||
int startLine,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
int nameEndOffset,
|
||||
int nameLine,
|
||||
IASTTemplate ownerTemplate,
|
||||
boolean isConst,
|
||||
boolean isVolatile,
|
||||
boolean isVirtual,
|
||||
boolean isExplicit,
|
||||
boolean isPureVirtual,
|
||||
List constructorChain,
|
||||
boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments ) throws ASTSemanticException
|
||||
boolean isVirtual,
|
||||
boolean isExplicit,
|
||||
boolean isPureVirtual, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments ) throws ASTSemanticException
|
||||
{
|
||||
List references = new ArrayList();
|
||||
IContainerSymbol ownerScope = scopeToSymbol( scope );
|
||||
|
@ -1639,8 +1639,10 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
isFriend,
|
||||
isStatic,
|
||||
startOffset,
|
||||
startLine,
|
||||
newName.getFirstToken().getOffset(),
|
||||
nameEndOffset,
|
||||
nameLine,
|
||||
ownerTemplate,
|
||||
isConst,
|
||||
isVolatile,
|
||||
|
@ -1648,9 +1650,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
isExplicit,
|
||||
isPureVirtual,
|
||||
ASTAccessVisibility.PRIVATE,
|
||||
constructorChain,
|
||||
references,
|
||||
isFunctionDefinition, hasFunctionTryBlock, hasVariableArguments );
|
||||
constructorChain, references, isFunctionDefinition, hasFunctionTryBlock, hasVariableArguments );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1695,7 +1695,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
{
|
||||
throw new ASTSemanticException();
|
||||
}
|
||||
ASTFunction function = new ASTFunction( symbol, nameEndOffset, parameters, returnType, exception, startOffset, nameOffset, ownerTemplate, references, previouslyDeclared, hasFunctionTryBlock );
|
||||
ASTFunction function = new ASTFunction( symbol, nameEndOffset, parameters, returnType, exception, startOffset, startLine, nameOffset, nameLine, ownerTemplate, references, previouslyDeclared, hasFunctionTryBlock );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension(symbol, function);
|
||||
|
@ -1895,20 +1895,20 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
boolean isFriend,
|
||||
boolean isStatic,
|
||||
int startOffset,
|
||||
int startLine,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
int nameLine,
|
||||
IASTTemplate ownerTemplate,
|
||||
boolean isConst,
|
||||
boolean isVolatile,
|
||||
boolean isVirtual,
|
||||
boolean isExplicit,
|
||||
boolean isPureVirtual,
|
||||
ASTAccessVisibility visibility, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments ) throws ASTSemanticException
|
||||
boolean isVirtual,
|
||||
boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments ) throws ASTSemanticException
|
||||
{
|
||||
return createMethod(scope, name, parameters, returnType, exception,
|
||||
isInline, isFriend, isStatic, startOffset, nameOffset, nameEndOffset,
|
||||
ownerTemplate, isConst, isVolatile, isVirtual, isExplicit, isPureVirtual,
|
||||
visibility, constructorChain, null, isFunctionDefinition, hasFunctionTryBlock, hasVariableArguments );
|
||||
isInline, isFriend, isStatic, startOffset, startLine, nameOffset,
|
||||
nameEndOffset, nameLine, ownerTemplate, isConst, isVolatile, isVirtual,
|
||||
isExplicit, isPureVirtual, visibility, constructorChain, null, isFunctionDefinition, hasFunctionTryBlock, hasVariableArguments );
|
||||
}
|
||||
|
||||
public IASTMethod createMethod(
|
||||
|
@ -1921,17 +1921,17 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
boolean isFriend,
|
||||
boolean isStatic,
|
||||
int startOffset,
|
||||
int startingLine,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
int nameLine,
|
||||
IASTTemplate ownerTemplate,
|
||||
boolean isConst,
|
||||
boolean isVolatile,
|
||||
boolean isVirtual,
|
||||
boolean isExplicit,
|
||||
boolean isExplicit,
|
||||
boolean isPureVirtual,
|
||||
ASTAccessVisibility visibility,
|
||||
List constructorChain,
|
||||
List references, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments ) throws ASTSemanticException
|
||||
ASTAccessVisibility visibility, List constructorChain, List references, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments ) throws ASTSemanticException
|
||||
{
|
||||
boolean isConstructor = false;
|
||||
boolean isDestructor = false;
|
||||
|
@ -2034,7 +2034,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
|
||||
resolveLeftoverConstructorInitializerMembers( symbol, constructorChain );
|
||||
|
||||
ASTMethod method = new ASTMethod( symbol, nameEndOffset, parameters, returnType, exception, startOffset, nameOffset, ownerTemplate, references, previouslyDeclared, isConstructor, isDestructor, isPureVirtual, visibility, constructorChain, hasFunctionTryBlock );
|
||||
ASTMethod method = new ASTMethod( symbol, parameters, returnType, exception, startOffset, startingLine, nameOffset, nameEndOffset, nameLine, ownerTemplate, references, previouslyDeclared, isConstructor, isDestructor, isPureVirtual, visibility, constructorChain, hasFunctionTryBlock );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension( symbol, method );
|
||||
|
@ -2113,7 +2113,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
boolean isRegister,
|
||||
boolean isStatic,
|
||||
int startingOffset,
|
||||
int nameOffset, int nameEndOffset, IASTExpression constructorExpression) throws ASTSemanticException
|
||||
int startingLine, int nameOffset, int nameEndOffset, int nameLine, IASTExpression constructorExpression) throws ASTSemanticException
|
||||
{
|
||||
List references = new ArrayList();
|
||||
IContainerSymbol ownerScope = scopeToSymbol( scope );
|
||||
|
@ -2163,7 +2163,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
){
|
||||
IASTScope fieldParentScope = (IASTScope)parentScope.getASTExtension().getPrimaryDeclaration();
|
||||
return createField(fieldParentScope, fieldName,isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern,
|
||||
isRegister, isStatic, startingOffset, offset, nameEndOffset, constructorExpression, ASTAccessVisibility.PRIVATE, references);
|
||||
isRegister, isStatic, startingOffset, startingLine, offset, nameEndOffset, nameLine, constructorExpression, ASTAccessVisibility.PRIVATE, references);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2198,7 +2198,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
// TODO Auto-generated catch block
|
||||
}
|
||||
|
||||
ASTVariable variable = new ASTVariable( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, nameEndOffset, references, constructorExpression, previouslyDeclared );
|
||||
ASTVariable variable = new ASTVariable( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, references, constructorExpression, previouslyDeclared );
|
||||
if( variable.getInitializerClause() != null )
|
||||
{
|
||||
variable.getInitializerClause().setOwnerVariableDeclaration(variable);
|
||||
|
@ -2344,11 +2344,11 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
boolean isRegister,
|
||||
boolean isStatic,
|
||||
int startingOffset,
|
||||
int nameOffset,
|
||||
int nameEndOffset, IASTExpression constructorExpression, ASTAccessVisibility visibility) throws ASTSemanticException
|
||||
int startingLine,
|
||||
int nameOffset, int nameEndOffset, int nameLine, IASTExpression constructorExpression, ASTAccessVisibility visibility) throws ASTSemanticException
|
||||
{
|
||||
return createField(scope, name,isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern,
|
||||
isRegister, isStatic, startingOffset, nameOffset, nameEndOffset, constructorExpression, visibility, null);
|
||||
isRegister, isStatic, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, constructorExpression, visibility, null);
|
||||
}
|
||||
|
||||
public IASTField createField(
|
||||
|
@ -2363,11 +2363,11 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
boolean isRegister,
|
||||
boolean isStatic,
|
||||
int startingOffset,
|
||||
int nameOffset,
|
||||
int startingLine,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
IASTExpression constructorExpression,
|
||||
ASTAccessVisibility visibility,
|
||||
List references) throws ASTSemanticException
|
||||
int nameLine,
|
||||
IASTExpression constructorExpression, ASTAccessVisibility visibility, List references) throws ASTSemanticException
|
||||
{
|
||||
IContainerSymbol ownerScope = scopeToSymbol( scope );
|
||||
|
||||
|
@ -2409,7 +2409,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
throw new ASTSemanticException();
|
||||
}
|
||||
|
||||
ASTField field = new ASTField( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, nameOffset, nameEndOffset, references, previouslyDeclared, constructorExpression, visibility );
|
||||
ASTField field = new ASTField( newSymbol, abstractDeclaration, initializerClause, bitfieldExpression, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, references, previouslyDeclared, constructorExpression, visibility );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension(newSymbol, field );
|
||||
|
@ -2430,7 +2430,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
IASTScope scope,
|
||||
List templateParameters,
|
||||
boolean exported,
|
||||
int startingOffset)
|
||||
int startingOffset, int startingLine)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return new ASTTemplateDeclaration();
|
||||
|
@ -2453,7 +2453,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
*/
|
||||
public IASTTemplateInstantiation createTemplateInstantiation(
|
||||
IASTScope scope,
|
||||
int startingOffset)
|
||||
int startingOffset, int startingLine)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return new ASTTemplateInstantiation();
|
||||
|
@ -2463,7 +2463,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
*/
|
||||
public IASTTemplateSpecialization createTemplateSpecialization(
|
||||
IASTScope scope,
|
||||
int startingOffset)
|
||||
int startingOffset, int startingLine)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return new ASTTemplateSpecialization();
|
||||
|
@ -2476,7 +2476,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
String name,
|
||||
IASTAbstractDeclaration mapping,
|
||||
int startingOffset,
|
||||
int nameOffset, int nameEndOffset) throws ASTSemanticException
|
||||
int startingLine, int nameOffset, int nameEndOffset, int nameLine) throws ASTSemanticException
|
||||
{
|
||||
IContainerSymbol containerSymbol = scopeToSymbol(scope);
|
||||
ISymbol newSymbol = pst.newSymbol( name, TypeInfo.t_type);
|
||||
|
@ -2497,7 +2497,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
{
|
||||
throw new ASTSemanticException();
|
||||
}
|
||||
ASTTypedef d = new ASTTypedef( newSymbol, mapping, startingOffset, nameOffset, nameEndOffset, references );
|
||||
ASTTypedef d = new ASTTypedef( newSymbol, mapping, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, references );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension(newSymbol, d );
|
||||
|
@ -2516,13 +2516,13 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
IASTTypeSpecifier typeSpecifier,
|
||||
IASTTemplate template,
|
||||
int startingOffset,
|
||||
int endingOffset)
|
||||
int startingLine, int endingOffset, int endingLine)
|
||||
{
|
||||
return new ASTAbstractTypeSpecifierDeclaration( scopeToSymbol(scope), typeSpecifier, template, startingOffset, endingOffset);
|
||||
return new ASTAbstractTypeSpecifierDeclaration( scopeToSymbol(scope), typeSpecifier, template, startingOffset, startingLine, endingOffset, endingLine);
|
||||
}
|
||||
|
||||
|
||||
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(IASTScope scope, ASTClassKind kind, ITokenDuple name, int startingOffset, int endOffset, boolean isForewardDecl, boolean isFriend) throws ASTSemanticException
|
||||
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(IASTScope scope, ASTClassKind kind, ITokenDuple name, int startingOffset, int startingLine, int endOffset, int endingLine, boolean isForewardDecl, boolean isFriend) throws ASTSemanticException
|
||||
{
|
||||
IContainerSymbol currentScopeSymbol = scopeToSymbol(scope);
|
||||
TypeInfo.eType pstType = classKindToTypeInfo(kind);
|
||||
|
@ -2576,7 +2576,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
}
|
||||
|
||||
ASTElaboratedTypeSpecifier elab =
|
||||
new ASTElaboratedTypeSpecifier( checkSymbol, kind, startingOffset, name.getFirstToken().getOffset(), name.getLastToken().getEndOffset(), endOffset, references, isForewardDecl );
|
||||
new ASTElaboratedTypeSpecifier( checkSymbol, kind, startingOffset, startingLine, name.getFirstToken().getOffset(), name.getLastToken().getEndOffset(), name.getLastToken().getLineNumber(), endOffset, endingLine, references, isForewardDecl );
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -2600,7 +2600,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
checkSymbol.getASTExtension().getPrimaryDeclaration() instanceof IASTEnumerationSpecifier
|
||||
)
|
||||
{
|
||||
ASTElaboratedTypeSpecifier elab = new ASTElaboratedTypeSpecifier( checkSymbol, kind, startingOffset, name.getFirstToken().getOffset(), name.getLastToken().getEndOffset(), endOffset, references, isForewardDecl );
|
||||
ASTElaboratedTypeSpecifier elab = new ASTElaboratedTypeSpecifier( checkSymbol, kind, startingOffset, startingLine, name.getFirstToken().getOffset(), name.getLastToken().getEndOffset(), name.getLastToken().getLineNumber(), endOffset, endingLine, references, isForewardDecl );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension( checkSymbol, elab );
|
||||
|
@ -2625,7 +2625,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
/* (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)
|
||||
*/
|
||||
public IASTNamespaceAlias createNamespaceAlias(IASTScope scope, String identifier, ITokenDuple alias, int startingOffset, int nameOffset, int nameEndOffset, int endOffset) throws ASTSemanticException
|
||||
public IASTNamespaceAlias createNamespaceAlias(IASTScope scope, String identifier, ITokenDuple alias, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endOffset, int endingLine) throws ASTSemanticException
|
||||
{
|
||||
IContainerSymbol startingSymbol = scopeToSymbol(scope);
|
||||
List references = new ArrayList();
|
||||
|
@ -2649,7 +2649,7 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
|
||||
ASTNamespaceAlias astAlias = new ASTNamespaceAlias(
|
||||
newSymbol, alias.toString(), (IASTNamespaceDefinition)namespaceSymbol.getASTExtension().getPrimaryDeclaration(),
|
||||
startingOffset, nameOffset, nameEndOffset, endOffset, references );
|
||||
startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, endOffset, endingLine, references );
|
||||
try
|
||||
{
|
||||
attachSymbolExtension( newSymbol, astAlias );
|
||||
|
@ -2701,9 +2701,9 @@ public class CompleteParseASTFactory extends BaseASTFactory implements IASTFacto
|
|||
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 nameOffset, int nameEndOffset, int endingOffset)
|
||||
public IASTParameterDeclaration createParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endingLine)
|
||||
{
|
||||
return new ASTParameterDeclaration( null, isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp, parameterName, initializerClause, startingOffset, endingOffset, nameOffset, nameEndOffset );
|
||||
return new ASTParameterDeclaration( null, isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp, parameterName, initializerClause, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, endingOffset, endingLine );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -43,15 +43,15 @@ public class ASTASMDefinition
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o) {
|
||||
offsets.setStartingOffset(o);
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber) {
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o) {
|
||||
offsets.setEndingOffset( o );
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber) {
|
||||
offsets.setEndingOffsetAndLineNumber( offset, lineNumber );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -96,4 +96,19 @@ public class ASTASMDefinition
|
|||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,15 +31,15 @@ public class ASTAbstractTypeSpecifierDeclaration
|
|||
* @param scope
|
||||
* @param typeSpecifier
|
||||
*/
|
||||
public ASTAbstractTypeSpecifierDeclaration(IASTScope scope, IASTTypeSpecifier typeSpecifier, IASTTemplate ownerTemplate, int startingOffset, int endingOffset)
|
||||
public ASTAbstractTypeSpecifierDeclaration(IASTScope scope, IASTTypeSpecifier typeSpecifier, IASTTemplate ownerTemplate, int startingOffset, int endingOffset, int startingLine, int endingLine)
|
||||
{
|
||||
super( ownerTemplate != null ? null : scope );
|
||||
this.typeSpecifier = typeSpecifier;
|
||||
this.ownerTemplate = ownerTemplate;
|
||||
if( ownerTemplate != null )
|
||||
ownerTemplate.setOwnedDeclaration( this );
|
||||
setStartingOffset(startingOffset);
|
||||
setEndingOffset(endingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setEndingOffsetAndLineNumber(endingOffset, endingLine);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -60,16 +60,16 @@ public class ASTAbstractTypeSpecifierDeclaration
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -114,4 +114,19 @@ public class ASTAbstractTypeSpecifierDeclaration
|
|||
public void exitScope(ISourceElementRequestor requestor)
|
||||
{
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -33,16 +33,16 @@ public class ASTClassSpecifier extends ASTScopedTypeSpecifier implements IASTQCl
|
|||
ASTClassKind kind,
|
||||
ClassNameType type,
|
||||
int startingOffset,
|
||||
int startingLine,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
ASTAccessVisibility access)
|
||||
int nameEndOffset, int nameLineNumber, ASTAccessVisibility access)
|
||||
{
|
||||
super( scope, name );
|
||||
classNameType = type;
|
||||
classKind = kind;
|
||||
offsets.setStartingOffset(startingOffset);
|
||||
offsets.setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
offsets.setNameOffset(nameOffset);
|
||||
offsets.setNameEndOffset(nameEndOffset);
|
||||
offsets.setNameEndOffsetAndLineNumber(nameEndOffset, nameLineNumber);
|
||||
this.access = access;
|
||||
this.name = name;
|
||||
}
|
||||
|
@ -114,16 +114,16 @@ public class ASTClassSpecifier extends ASTScopedTypeSpecifier implements IASTQCl
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -206,8 +206,29 @@ public class ASTClassSpecifier extends ASTScopedTypeSpecifier implements IASTQCl
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,14 +35,14 @@ public class ASTElaboratedTypeSpecifier extends ASTNode implements IASTElaborate
|
|||
* @param startingOffset
|
||||
* @param endOffset
|
||||
*/
|
||||
public ASTElaboratedTypeSpecifier(IASTScope scope, ASTClassKind elaboratedClassKind, String typeName, int startingOffset, int nameOffset, int nameEndOffset, int endOffset)
|
||||
public ASTElaboratedTypeSpecifier(IASTScope scope, ASTClassKind elaboratedClassKind, String typeName, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endOffset, int endingLine)
|
||||
{
|
||||
classKind = elaboratedClassKind;
|
||||
this.typeName = typeName;
|
||||
setStartingOffset( startingOffset );
|
||||
setStartingOffsetAndLineNumber( startingOffset, startingLine );
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset( nameEndOffset );
|
||||
setEndingOffset( endOffset );
|
||||
setNameEndOffsetAndLineNumber( nameEndOffset, nameLine );
|
||||
setEndingOffsetAndLineNumber( endOffset, endingLine );
|
||||
qualifiedName = new ASTQualifiedNamedElement( scope, typeName );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -62,16 +62,16 @@ public class ASTElaboratedTypeSpecifier extends ASTNode implements IASTElaborate
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -151,8 +151,27 @@ public class ASTElaboratedTypeSpecifier extends ASTNode implements IASTElaborate
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,13 +36,13 @@ public class ASTEnumerationSpecifier extends ASTScopedTypeSpecifier
|
|||
* @param name
|
||||
* @param startingOffset
|
||||
*/
|
||||
public ASTEnumerationSpecifier(IASTScope scope, String name, int startingOffset, int nameOffset, int nameEndOffset )
|
||||
public ASTEnumerationSpecifier(IASTScope scope, String name, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine )
|
||||
{
|
||||
super( scope, name );
|
||||
this.name = name;
|
||||
offsets.setNameOffset( nameOffset );
|
||||
offsets.setStartingOffset( startingOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
offsets.setStartingOffsetAndLineNumber( startingOffset, startingLine);
|
||||
setNameEndOffsetAndLineNumber(nameEndOffset, nameLine);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getName()
|
||||
|
@ -68,16 +68,16 @@ public class ASTEnumerationSpecifier extends ASTScopedTypeSpecifier
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -144,8 +144,28 @@ public class ASTEnumerationSpecifier extends ASTScopedTypeSpecifier
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,14 +35,14 @@ public class ASTEnumerator
|
|||
* @param startingOffset
|
||||
* @param endingOffset
|
||||
*/
|
||||
public ASTEnumerator(IASTEnumerationSpecifier enumeration, String string, int startingOffset, int nameOffset, int nameEndOffset, int endingOffset, IASTExpression initialValue)
|
||||
public ASTEnumerator(IASTEnumerationSpecifier enumeration, String string, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endLine, IASTExpression initialValue)
|
||||
{
|
||||
this.enumeration = enumeration;
|
||||
name = string;
|
||||
offsets.setStartingOffset( startingOffset );
|
||||
offsets.setStartingOffsetAndLineNumber( startingOffset, startingLine );
|
||||
offsets.setNameOffset( nameOffset );
|
||||
offsets.setNameEndOffset( nameEndOffset );
|
||||
offsets.setEndingOffset( endingOffset );
|
||||
offsets.setNameEndOffsetAndLineNumber( nameEndOffset, nameLine );
|
||||
offsets.setEndingOffsetAndLineNumber( endingOffset, endLine );
|
||||
this.initialValue = initialValue;
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -69,16 +69,16 @@ public class ASTEnumerator
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -137,9 +137,28 @@ public class ASTEnumerator
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class ASTField extends ASTVariable implements IASTField
|
|||
* @param isRegister
|
||||
* @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, int nameEndOffset, 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 startLine, int nameOffset, int nameEndOffset, int nameLine, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
||||
{
|
||||
super(
|
||||
scope,
|
||||
|
@ -50,7 +50,7 @@ public class ASTField extends ASTVariable implements IASTField
|
|||
isMutable,
|
||||
isExtern,
|
||||
isRegister,
|
||||
isStatic, startingOffset, nameOffset, nameEndOffset, constructorExpression );
|
||||
isStatic, startingOffset, startLine, nameOffset, nameEndOffset, nameLine, constructorExpression );
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
|||
/**
|
||||
* @param scope
|
||||
*/
|
||||
public ASTFunction(IASTScope scope, String name, int nameEndOffset, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception,
|
||||
boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, IASTTemplate ownerTemplate, boolean hasFunctionTryBlock, boolean hasVarArgs )
|
||||
public ASTFunction(IASTScope scope, String name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline,
|
||||
boolean isFriend, boolean isStatic, int startOffset, int startLine, int nameOffset, int nameEndOffset, IASTTemplate ownerTemplate, boolean hasFunctionTryBlock, boolean hasVarArgs, int nameLine )
|
||||
{
|
||||
super(ownerTemplate != null ? null : scope );
|
||||
this.name = name;
|
||||
|
@ -48,10 +48,10 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
|||
this.ownerTemplateDeclaration = ownerTemplate;
|
||||
if( ownerTemplate != null )
|
||||
ownerTemplate.setOwnedDeclaration( this );
|
||||
offsets.setStartingOffset( startOffset );
|
||||
offsets.setStartingOffsetAndLineNumber( startOffset, startLine );
|
||||
offsets.setNameOffset( nameOffset );
|
||||
qualifiedName = new ASTQualifiedNamedElement( scope, name );
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setNameEndOffsetAndLineNumber(nameEndOffset, nameLine);
|
||||
this.hasFunctionTryBlock = hasFunctionTryBlock;
|
||||
this.varArgs = hasVarArgs;
|
||||
}
|
||||
|
@ -142,16 +142,16 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -260,9 +260,9 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
private boolean hasFunctionTryBlock = false;
|
||||
|
@ -288,4 +288,24 @@ public class ASTFunction extends ASTDeclaration implements IASTFunction
|
|||
public boolean takesVarArgs() {
|
||||
return varArgs;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,11 +30,11 @@ public class ASTLinkageSpecification
|
|||
|
||||
private final String linkage;
|
||||
|
||||
public ASTLinkageSpecification( IASTScope scope, String linkage, int startingOffset )
|
||||
public ASTLinkageSpecification( IASTScope scope, String linkage, int startingOffset, int startingLine )
|
||||
{
|
||||
super( scope );
|
||||
this.linkage = linkage;
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -62,16 +62,16 @@ public class ASTLinkageSpecification
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -125,4 +125,19 @@ public class ASTLinkageSpecification
|
|||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,7 +54,6 @@ public class ASTMethod extends ASTFunction implements IASTMethod
|
|||
public ASTMethod(
|
||||
IASTScope scope,
|
||||
String name,
|
||||
int nameEndOffset,
|
||||
List parameters,
|
||||
IASTAbstractDeclaration returnType,
|
||||
IASTExceptionSpecification exception,
|
||||
|
@ -62,30 +61,31 @@ public class ASTMethod extends ASTFunction implements IASTMethod
|
|||
boolean isFriend,
|
||||
boolean isStatic,
|
||||
int startOffset,
|
||||
int startLine,
|
||||
int nameOffset,
|
||||
int nameEndOffset,
|
||||
int nameLine,
|
||||
IASTTemplate ownerTemplate,
|
||||
boolean isConst,
|
||||
boolean isVolatile,
|
||||
boolean isConstructor,
|
||||
boolean isDestructor,
|
||||
boolean isVirtual,
|
||||
boolean isExplicit,
|
||||
boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChainElements,
|
||||
boolean hasFunctionTryBlock, boolean hasVarArgs )
|
||||
boolean isVirtual, boolean isExplicit, boolean isPureVirtual,
|
||||
ASTAccessVisibility visibility, List constructorChainElements, boolean hasFunctionTryBlock, boolean hasVarArgs )
|
||||
{
|
||||
super(
|
||||
scope,
|
||||
name,
|
||||
nameEndOffset,
|
||||
parameters,
|
||||
parameters,
|
||||
returnType,
|
||||
exception,
|
||||
isInline,
|
||||
isFriend,
|
||||
isStatic,
|
||||
startOffset,
|
||||
startLine,
|
||||
nameOffset,
|
||||
ownerTemplate, hasFunctionTryBlock, hasVarArgs);
|
||||
nameEndOffset, ownerTemplate, hasFunctionTryBlock, hasVarArgs, nameLine);
|
||||
this.isVirtual = isVirtual;
|
||||
this.isPureVirtual = isPureVirtual;
|
||||
this.isConstructor = isConstructor;
|
||||
|
|
|
@ -35,13 +35,13 @@ public class ASTNamespaceAlias extends ASTDeclaration implements IASTNamespaceAl
|
|||
* @param nameOffset
|
||||
* @param endOffset
|
||||
*/
|
||||
public ASTNamespaceAlias(IASTScope scope, String identifier, String string, int startingOffset, int nameOffset, int nameEndOffset, int endOffset)
|
||||
public ASTNamespaceAlias(IASTScope scope, String identifier, String string, int startingOffset, int nameOffset, int nameEndOffset, int endOffset, int startingLine, int nameLine, int endingLine)
|
||||
{
|
||||
super( scope );
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset( nameEndOffset );
|
||||
setEndingOffset(endOffset);
|
||||
setNameEndOffsetAndLineNumber( nameEndOffset, nameLine );
|
||||
setEndingOffsetAndLineNumber(endOffset, endingLine);
|
||||
this.identifier = identifier;
|
||||
this.alias = string;
|
||||
}
|
||||
|
@ -104,17 +104,17 @@ public class ASTNamespaceAlias extends ASTDeclaration implements IASTNamespaceAl
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingOffset()
|
||||
|
@ -141,8 +141,28 @@ public class ASTNamespaceAlias extends ASTDeclaration implements IASTNamespaceAl
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,14 +31,14 @@ public class ASTNamespaceDefinition extends ASTDeclaration implements IASTNamesp
|
|||
private NamedOffsets offsets = new NamedOffsets();
|
||||
private final ASTQualifiedNamedElement qualifiedNameElement;
|
||||
|
||||
public ASTNamespaceDefinition( IASTScope scope, String name, int startOffset, int nameOffset, int nameEndOffset )
|
||||
public ASTNamespaceDefinition( IASTScope scope, String name, int startOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine )
|
||||
{
|
||||
super( scope );
|
||||
qualifiedNameElement = new ASTQualifiedNamedElement( scope, name );
|
||||
this.name = name;
|
||||
setStartingOffset(startOffset);
|
||||
setStartingOffsetAndLineNumber(startOffset, startingLine);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setNameEndOffsetAndLineNumber(nameEndOffset, nameEndOffset);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getName()
|
||||
|
@ -64,16 +64,16 @@ public class ASTNamespaceDefinition extends ASTDeclaration implements IASTNamesp
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o) {
|
||||
offsets.setStartingOffset(o);
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber) {
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o) {
|
||||
offsets.setEndingOffset(o);
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber) {
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -155,8 +155,27 @@ public class ASTNamespaceDefinition extends ASTDeclaration implements IASTNamesp
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}}
|
||||
|
|
|
@ -36,15 +36,15 @@ public class ASTParameterDeclaration extends ASTAbstractDeclaration implements I
|
|||
* @param parameterName
|
||||
* @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, int nameEndOffset )
|
||||
public ASTParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endingLine )
|
||||
{
|
||||
super( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp );
|
||||
this.parameterName = parameterName;
|
||||
this.initializerClause = initializerClause;
|
||||
setStartingOffset( startingOffset );
|
||||
setEndingOffset( endingOffset );
|
||||
setStartingOffsetAndLineNumber( startingOffset, startingLine );
|
||||
setEndingOffsetAndLineNumber( endingOffset, endingLine );
|
||||
setNameOffset( nameOffset );
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setNameEndOffsetAndLineNumber(nameEndOffset, nameLine);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTParameterDeclaration#getName()
|
||||
|
@ -78,16 +78,16 @@ public class ASTParameterDeclaration extends ASTAbstractDeclaration implements I
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingOffset()
|
||||
|
@ -114,8 +114,28 @@ public class ASTParameterDeclaration extends ASTAbstractDeclaration implements I
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,11 +32,11 @@ public class ASTTemplateDeclaration extends ASTDeclaration implements IASTTempla
|
|||
/**
|
||||
* @param templateParameters
|
||||
*/
|
||||
public ASTTemplateDeclaration(IASTScope scope, List templateParameters, int startingOffset, boolean isExported)
|
||||
public ASTTemplateDeclaration(IASTScope scope, List templateParameters, int startingOffset, int startingLine, boolean isExported)
|
||||
{
|
||||
super( scope );
|
||||
this.templateParameters = templateParameters;
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
this.isExported = isExported;
|
||||
}
|
||||
|
||||
|
@ -57,17 +57,17 @@ public class ASTTemplateDeclaration extends ASTDeclaration implements IASTTempla
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -136,4 +136,19 @@ public class ASTTemplateDeclaration extends ASTDeclaration implements IASTTempla
|
|||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,10 +28,10 @@ public class ASTTemplateInstantiation extends ASTDeclaration implements IASTTemp
|
|||
/**
|
||||
* @param scope
|
||||
*/
|
||||
public ASTTemplateInstantiation(IASTScope scope, int startingOffset)
|
||||
public ASTTemplateInstantiation(IASTScope scope, int startingOffset, int startingLine)
|
||||
{
|
||||
super( scope );
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -53,17 +53,17 @@ public class ASTTemplateInstantiation extends ASTDeclaration implements IASTTemp
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset( o );
|
||||
offsets.setEndingOffsetAndLineNumber( offset, lineNumber );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -119,4 +119,19 @@ public class ASTTemplateInstantiation extends ASTDeclaration implements IASTTemp
|
|||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,10 +27,10 @@ public class ASTTemplateSpecialization extends ASTDeclaration implements IASTTem
|
|||
/**
|
||||
* @param scope
|
||||
*/
|
||||
public ASTTemplateSpecialization(IASTScope scope, int startingOffset )
|
||||
public ASTTemplateSpecialization(IASTScope scope, int startingOffset, int startingLine )
|
||||
{
|
||||
super(scope);
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -43,16 +43,16 @@ public class ASTTemplateSpecialization extends ASTDeclaration implements IASTTem
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -113,4 +113,19 @@ public class ASTTemplateSpecialization extends ASTDeclaration implements IASTTem
|
|||
/* do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,14 +32,14 @@ public class ASTTypedefDeclaration extends ASTDeclaration implements IASTTypedef
|
|||
* @param name
|
||||
* @param mapping
|
||||
*/
|
||||
public ASTTypedefDeclaration(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, int nameEndOffset )
|
||||
public ASTTypedefDeclaration(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine )
|
||||
{
|
||||
super( scope );
|
||||
this.name = name;
|
||||
this.mapping = mapping;
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset(nameEndOffset);
|
||||
setNameEndOffsetAndLineNumber(nameEndOffset, nameLine);
|
||||
qualifiedName = new ASTQualifiedNamedElement( scope, name );
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
|
@ -73,17 +73,17 @@ public class ASTTypedefDeclaration extends ASTDeclaration implements IASTTypedef
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -143,8 +143,28 @@ public class ASTTypedefDeclaration extends ASTDeclaration implements IASTTypedef
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,13 +28,13 @@ public class ASTUsingDeclaration
|
|||
private final boolean isTypename;
|
||||
private final String mappingName;
|
||||
|
||||
public ASTUsingDeclaration( IASTScope scope, boolean isTypeName, String mappingName, int startingOffset, int endingOffset )
|
||||
public ASTUsingDeclaration( IASTScope scope, boolean isTypeName, String mappingName, int startingOffset, int startingLine, int endingOffset, int endingLine )
|
||||
{
|
||||
super( scope );
|
||||
isTypename = isTypeName;
|
||||
this.mappingName = mappingName;
|
||||
setStartingOffset(startingOffset);
|
||||
setEndingOffset(endingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setEndingOffsetAndLineNumber(endingOffset, endingLine);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTUsingDeclaration#isTypename()
|
||||
|
@ -53,16 +53,16 @@ public class ASTUsingDeclaration
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -112,4 +112,19 @@ public class ASTUsingDeclaration
|
|||
{
|
||||
throw new ASTNotImplementedException();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,12 +26,12 @@ public class ASTUsingDirective
|
|||
implements IASTUsingDirective {
|
||||
|
||||
|
||||
public ASTUsingDirective( IASTScope scope, String name, int startingOffset, int endingOffset )
|
||||
public ASTUsingDirective( IASTScope scope, String name, int startingOffset, int startingLine, int endingOffset, int endingLine )
|
||||
{
|
||||
super( scope );
|
||||
this.namespaceName = name;
|
||||
setStartingOffset(startingOffset);
|
||||
setEndingOffset(endingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startingLine);
|
||||
setEndingOffsetAndLineNumber(endingOffset, endingLine);
|
||||
|
||||
}
|
||||
private final String namespaceName;
|
||||
|
@ -45,16 +45,16 @@ public class ASTUsingDirective
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -104,4 +104,19 @@ public class ASTUsingDirective
|
|||
{
|
||||
throw new ASTNotImplementedException();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public class ASTVariable extends ASTDeclaration implements IASTVariable
|
|||
* @param scope
|
||||
*/
|
||||
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, int nameEndOffset, IASTExpression constructorExpression )
|
||||
IASTAbstractDeclaration abstractDeclaration, boolean isMutable, boolean isExtern, boolean isRegister, boolean isStatic, int startingOffset, int startLine, int nameOffset, int nameEndOffset, int nameLine, IASTExpression constructorExpression )
|
||||
{
|
||||
super(scope);
|
||||
this.isAuto = isAuto;
|
||||
|
@ -55,9 +55,9 @@ public class ASTVariable extends ASTDeclaration implements IASTVariable
|
|||
this.name = name;
|
||||
this.constructorExpression = constructorExpression;
|
||||
qualifiedName = new ASTQualifiedNamedElement( scope, name );
|
||||
setStartingOffset(startingOffset);
|
||||
setStartingOffsetAndLineNumber(startingOffset, startLine);
|
||||
setNameOffset(nameOffset);
|
||||
setNameEndOffset( nameEndOffset );
|
||||
setNameEndOffsetAndLineNumber( nameEndOffset, nameLine );
|
||||
if( initializerClause != null )
|
||||
initializerClause.setOwnerVariableDeclaration(this);
|
||||
}
|
||||
|
@ -134,16 +134,16 @@ public class ASTVariable extends ASTDeclaration implements IASTVariable
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setStartingOffset(int)
|
||||
*/
|
||||
public void setStartingOffset(int o)
|
||||
public void setStartingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setStartingOffset(o);
|
||||
offsets.setStartingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#setEndingOffset(int)
|
||||
*/
|
||||
public void setEndingOffset(int o)
|
||||
public void setEndingOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setEndingOffset(o);
|
||||
offsets.setEndingOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getElementStartingOffset()
|
||||
|
@ -224,8 +224,29 @@ public class ASTVariable extends ASTDeclaration implements IASTVariable
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#setNameEndOffset(int)
|
||||
*/
|
||||
public void setNameEndOffset(int o)
|
||||
public void setNameEndOffsetAndLineNumber(int offset, int lineNumber)
|
||||
{
|
||||
offsets.setNameEndOffset(o);
|
||||
offsets.setNameEndOffsetAndLineNumber(offset, lineNumber);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getStartingLine()
|
||||
*/
|
||||
public int getStartingLine() {
|
||||
return offsets.getStartingLine();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableElement#getEndingLine()
|
||||
*/
|
||||
public int getEndingLine() {
|
||||
return offsets.getEndingLine();
|
||||
}
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTOffsetableNamedElement#getNameLineNumber()
|
||||
*/
|
||||
public int getNameLineNumber() {
|
||||
return offsets.getNameLineNumber();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,25 +68,25 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createUsingDirective(org.eclipse.cdt.internal.core.parser.ast.IASTScope, org.eclipse.cdt.internal.core.parser.TokenDuple)
|
||||
*/
|
||||
public IASTUsingDirective createUsingDirective(IASTScope scope, ITokenDuple duple, int startingOffset, int endingOffset) {
|
||||
return new ASTUsingDirective( scope, duple.toString(), startingOffset, endingOffset );
|
||||
public IASTUsingDirective createUsingDirective(IASTScope scope, ITokenDuple duple, int startingOffset, int startingLine, int endingOffset, int endingLine) {
|
||||
return new ASTUsingDirective( scope, duple.toString(), startingOffset, startingLine, endingOffset, endingLine );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createASMDefinition(org.eclipse.cdt.internal.core.parser.ast.IASTScope, java.lang.String, int, int)
|
||||
*/
|
||||
public IASTASMDefinition createASMDefinition(IASTScope scope, String assembly, int first, int last) {
|
||||
public IASTASMDefinition createASMDefinition(IASTScope scope, String assembly, int startingOffset, int startingLine, int endingOffset, int endingLine) {
|
||||
IASTASMDefinition definition = new ASTASMDefinition( scope, assembly );
|
||||
definition.setStartingOffset( first );
|
||||
definition.setEndingOffset( last );
|
||||
definition.setStartingOffsetAndLineNumber( startingOffset, startingLine );
|
||||
definition.setEndingOffsetAndLineNumber( endingOffset, endingLine );
|
||||
return definition;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @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, int nameEndOffset) {
|
||||
IASTNamespaceDefinition definition = new ASTNamespaceDefinition( scope, identifier, first, nameOffset, nameEndOffset );
|
||||
public IASTNamespaceDefinition createNamespaceDefinition(IASTScope scope, String identifier, int first, int startingLine, int nameOffset, int nameEndOffset, int nameLineNumber) {
|
||||
IASTNamespaceDefinition definition = new ASTNamespaceDefinition( scope, identifier, first, startingLine, nameOffset, nameEndOffset, nameLineNumber );
|
||||
return definition;
|
||||
}
|
||||
|
||||
|
@ -100,22 +100,22 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.parser.ast.IASTFactory#createLinkageSpecification(java.lang.String)
|
||||
*/
|
||||
public IASTLinkageSpecification createLinkageSpecification(IASTScope scope, String spec, int startingOffset) {
|
||||
return new ASTLinkageSpecification( scope, spec, startingOffset );
|
||||
public IASTLinkageSpecification createLinkageSpecification(IASTScope scope, String spec, int startingOffset, int startingLine) {
|
||||
return new ASTLinkageSpecification( scope, spec, startingOffset, startingLine );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createUsingDeclaration(org.eclipse.cdt.core.parser.ast.IASTScope, boolean, org.eclipse.cdt.internal.core.parser.TokenDuple)
|
||||
*/
|
||||
public IASTUsingDeclaration createUsingDeclaration(IASTScope scope, boolean isTypeName, ITokenDuple name, int startingOffset, int endingOffset) {
|
||||
return new ASTUsingDeclaration( scope, isTypeName, name.toString(), startingOffset, endingOffset );
|
||||
public IASTUsingDeclaration createUsingDeclaration(IASTScope scope, boolean isTypeName, ITokenDuple name, int startingOffset, int startingLine, int endingOffset, int endingLine) {
|
||||
return new ASTUsingDeclaration( scope, isTypeName, name.toString(), startingOffset, startingLine, endingOffset, endingLine );
|
||||
}
|
||||
|
||||
/* (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)
|
||||
*/
|
||||
public IASTClassSpecifier createClassSpecifier(IASTScope scope, ITokenDuple name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int nameOffset, int nameEndOffset ) {
|
||||
return new ASTClassSpecifier( scope, name == null ? "" : name.toString() , kind, type, startingOffset, nameOffset, nameEndOffset, access );
|
||||
public IASTClassSpecifier createClassSpecifier(IASTScope scope, ITokenDuple name, ASTClassKind kind, ClassNameType type, ASTAccessVisibility access, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine ) {
|
||||
return new ASTClassSpecifier( scope, name == null ? "" : name.toString() , kind, type, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, access );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -129,17 +129,17 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createEnumerationSpecifier(java.lang.String, int)
|
||||
*/
|
||||
public IASTEnumerationSpecifier createEnumerationSpecifier(IASTScope scope, String name, int startingOffset, int nameOffset, int nameEndOffset)
|
||||
public IASTEnumerationSpecifier createEnumerationSpecifier(IASTScope scope, String name, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine)
|
||||
{
|
||||
return new ASTEnumerationSpecifier( scope, name, startingOffset, nameOffset, nameEndOffset );
|
||||
return new ASTEnumerationSpecifier( scope, name, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @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 nameOffset, int nameEndOffset, int endingOffset, IASTExpression initialValue)
|
||||
public void addEnumerator(IASTEnumerationSpecifier enumeration, String string, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endLine, IASTExpression initialValue)
|
||||
{
|
||||
IASTEnumerator enumerator = new ASTEnumerator( enumeration, string, startingOffset, nameOffset, nameEndOffset, endingOffset, initialValue );
|
||||
IASTEnumerator enumerator = new ASTEnumerator( enumeration, string, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, endingOffset, endLine, initialValue );
|
||||
((ASTEnumerationSpecifier)enumeration).addEnumerator( enumerator );
|
||||
}
|
||||
|
||||
|
@ -184,42 +184,42 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (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)
|
||||
*/
|
||||
public IASTFunction createFunction(IASTScope scope, ITokenDuple name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, int nameEndOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments )
|
||||
public IASTFunction createFunction(IASTScope scope, ITokenDuple name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int startLine, int nameOffset, int nameEndOffset, int nameLine, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments )
|
||||
{
|
||||
return new ASTFunction(scope, name.toString(), nameEndOffset, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate, hasFunctionTryBlock, hasVariableArguments );
|
||||
return new ASTFunction(scope, name.toString(), parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, startLine, nameOffset, nameEndOffset, ownerTemplate, hasFunctionTryBlock, hasVariableArguments, nameLine );
|
||||
}
|
||||
|
||||
/* (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)
|
||||
*/
|
||||
public IASTMethod createMethod(IASTScope scope, ITokenDuple name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int nameOffset, int nameEndOffset, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments )
|
||||
public IASTMethod createMethod(IASTScope scope, ITokenDuple name, List parameters, IASTAbstractDeclaration returnType, IASTExceptionSpecification exception, boolean isInline, boolean isFriend, boolean isStatic, int startOffset, int startLine, int nameOffset, int nameEndOffset, int nameLine, IASTTemplate ownerTemplate, boolean isConst, boolean isVolatile, boolean isVirtual, boolean isExplicit, boolean isPureVirtual, ASTAccessVisibility visibility, List constructorChain, boolean isFunctionDefinition, boolean hasFunctionTryBlock, boolean hasVariableArguments )
|
||||
{
|
||||
return new ASTMethod(scope, name.toString(), nameEndOffset, parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, nameOffset, ownerTemplate, isConst, isVolatile, false, false, isVirtual, isExplicit, isPureVirtual, visibility, constructorChain, hasFunctionTryBlock, hasVariableArguments);
|
||||
return new ASTMethod(scope, name.toString(), parameters, returnType, exception, isInline, isFriend, isStatic, startOffset, startLine, nameOffset, nameEndOffset, nameLine, ownerTemplate, isConst, isVolatile, false, false, isVirtual, isExplicit, isPureVirtual, visibility, constructorChain, hasFunctionTryBlock, hasVariableArguments);
|
||||
}
|
||||
|
||||
/* (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)
|
||||
*/
|
||||
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)
|
||||
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 startingLine, int nameOffset, int nameEndOffset, int nameLine, IASTExpression constructorExpression)
|
||||
{
|
||||
return new ASTVariable(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, nameOffset, nameEndOffset, constructorExpression);
|
||||
return new ASTVariable(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, constructorExpression);
|
||||
}
|
||||
|
||||
/* (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)
|
||||
*/
|
||||
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)
|
||||
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 startingLine, int nameOffset, int nameEndOffset, int nameLine, IASTExpression constructorExpression, ASTAccessVisibility visibility)
|
||||
{
|
||||
final ASTField field = new ASTField(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, nameOffset, nameEndOffset, constructorExpression, visibility);
|
||||
final ASTField field = new ASTField(scope, name, isAuto, initializerClause, bitfieldExpression, abstractDeclaration, isMutable, isExtern, isRegister, isStatic, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, constructorExpression, visibility);
|
||||
return field;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTemplateDeclaration(java.util.List)
|
||||
*/
|
||||
public IASTTemplateDeclaration createTemplateDeclaration(IASTScope scope, List templateParameters, boolean exported, int startingOffset)
|
||||
public IASTTemplateDeclaration createTemplateDeclaration(IASTScope scope, List templateParameters, boolean exported, int startingOffset, int startingLine)
|
||||
{
|
||||
return new ASTTemplateDeclaration( scope, templateParameters, startingOffset, exported );
|
||||
return new ASTTemplateDeclaration( scope, templateParameters, startingOffset, startingLine, exported );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -233,46 +233,46 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTemplateInstantiation()
|
||||
*/
|
||||
public IASTTemplateInstantiation createTemplateInstantiation(IASTScope scope, int startingOffset)
|
||||
public IASTTemplateInstantiation createTemplateInstantiation(IASTScope scope, int startingOffset, int startingLine)
|
||||
{
|
||||
return new ASTTemplateInstantiation(scope, startingOffset);
|
||||
return new ASTTemplateInstantiation(scope, startingOffset, startingLine);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTemplateSpecialization()
|
||||
*/
|
||||
public IASTTemplateSpecialization createTemplateSpecialization(IASTScope scope, int startingOffset)
|
||||
public IASTTemplateSpecialization createTemplateSpecialization(IASTScope scope, int startingOffset, int startingLine)
|
||||
{
|
||||
return new ASTTemplateSpecialization(scope, startingOffset );
|
||||
return new ASTTemplateSpecialization(scope, startingOffset, startingLine );
|
||||
}
|
||||
|
||||
/* (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)
|
||||
*/
|
||||
public IASTTypedefDeclaration createTypedef(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int nameOffset, int nameEndOffset)
|
||||
public IASTTypedefDeclaration createTypedef(IASTScope scope, String name, IASTAbstractDeclaration mapping, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine)
|
||||
{
|
||||
return new ASTTypedefDeclaration( scope, name, mapping, startingOffset, nameOffset, nameEndOffset);
|
||||
return new ASTTypedefDeclaration( scope, name, mapping, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ast.IASTFactory#createTypeSpecDeclaration(org.eclipse.cdt.core.parser.ast.IASTScope, boolean, org.eclipse.cdt.core.parser.ast.IASTTypeSpecifier, java.util.List, java.util.List)
|
||||
*/
|
||||
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 startingLine, int endingOffset, int endingLine)
|
||||
{
|
||||
return new ASTAbstractTypeSpecifierDeclaration( scope, typeSpecifier, template, startingOffset, endingOffset );
|
||||
return new ASTAbstractTypeSpecifierDeclaration( scope, typeSpecifier, template, startingOffset, endingOffset, startingLine, endingLine );
|
||||
}
|
||||
|
||||
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(IASTScope scope, ASTClassKind elaboratedClassKind, ITokenDuple typeName, int startingOffset, int endOffset, boolean isForewardDecl, boolean isFriend)
|
||||
public IASTElaboratedTypeSpecifier createElaboratedTypeSpecifier(IASTScope scope, ASTClassKind elaboratedClassKind, ITokenDuple typeName, int startingOffset, int startingLine, int endOffset, int endingLine, boolean isForewardDecl, boolean isFriend)
|
||||
{
|
||||
return new ASTElaboratedTypeSpecifier( scope, elaboratedClassKind, typeName.toString(), startingOffset, typeName.getFirstToken().getOffset(), typeName.getLastToken().getEndOffset(), endOffset );
|
||||
return new ASTElaboratedTypeSpecifier( scope, elaboratedClassKind, typeName.toString(), startingOffset, startingLine, typeName.getFirstToken().getOffset(), typeName.getLastToken().getEndOffset(), typeName.getLastToken().getLineNumber(), endOffset, endingLine );
|
||||
}
|
||||
|
||||
/* (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)
|
||||
*/
|
||||
public IASTNamespaceAlias createNamespaceAlias(IASTScope scope, String identifier, ITokenDuple alias, int startingOffset, int nameOffset, int nameEndOffset, int endOffset)
|
||||
public IASTNamespaceAlias createNamespaceAlias(IASTScope scope, String identifier, ITokenDuple alias, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endOffset, int endingLine)
|
||||
{
|
||||
return new ASTNamespaceAlias( scope, identifier, alias.toString(), startingOffset, nameOffset, nameEndOffset, endOffset );
|
||||
return new ASTNamespaceAlias( scope, identifier, alias.toString(), startingOffset, nameOffset, nameEndOffset, endOffset, startingLine, nameLine, endingLine );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -289,9 +289,9 @@ public class QuickParseASTFactory extends BaseASTFactory implements IASTFactory
|
|||
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 nameOffset, int nameEndOffset, int endingOffset)
|
||||
public IASTParameterDeclaration createParameterDeclaration(boolean isConst, boolean isVolatile, IASTTypeSpecifier typeSpecifier, List pointerOperators, List arrayModifiers, List parameters, ASTPointerOperator pointerOp, String parameterName, IASTInitializerClause initializerClause, int startingOffset, int startingLine, int nameOffset, int nameEndOffset, int nameLine, int endingOffset, int endingLine)
|
||||
{
|
||||
return new ASTParameterDeclaration( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp, parameterName, initializerClause, startingOffset, endingOffset, nameOffset, nameEndOffset );
|
||||
return new ASTParameterDeclaration( isConst, isVolatile, typeSpecifier, pointerOperators, arrayModifiers, parameters, pointerOp, parameterName, initializerClause, startingOffset, startingLine, nameOffset, nameEndOffset, nameLine, endingOffset, endingLine );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
Loading…
Add table
Reference in a new issue