ΒΆCXToken* clang_getToken(CXTranslationUnit TU,
                        CXSourceLocation Location)

Description

Get the raw lexical token starting with the given location.

Declared at: clang/include/clang-c/Index.h:5074

Parameters

CXTranslationUnit TU
the translation unit whose text is being tokenized.
CXSourceLocation Location
the source location with which the token starts.

Returns

The token starting with the given location or NULL if no such token exist. The returned pointer must be freed with clang_disposeTokens before the translation unit is destroyed.