Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] new API for selecting nodes in an ASTTranslationUnit

Hi,
as a preparation for fixing a couple of navigation bugs I have cleaned
up the API for finding nodes in the AST. Now, you can obtain an
IASTNodeSelector for a IASTTranslationUnit. This interface contains
various methods to find nodes contained, surrounding or matching a
specific range in the code.


Introduced new interfaces:
- deprecated IASTMacroExpansion (extends IASTNodeLocation)
+ new: IASTMacroExpansionLocation (extends IASTNodeLocation)
+ new: IASTPreprocessorMacroExpansion (extends IASTNode)
+ new: IASTNodeSelector

IASTTranslationUnit:
- deprecated IASTNode selectNodeForLocation(String path, int offset, int
length)
+ new: IASTNodeSelector getNodeSelector(String filePath)
+ new: IASTPreprocessorMacroExpansion[] getMacroExpansions()

ILanguage:
- deprecated IASTName[] getSelectedNames(IASTTranslationUnit ast, int
start, int length)


Markus.


Back to the top