import { CXCursorKind } from "https://deno.land/x/libclang@1.0.0-beta.8/mod.ts";
Describes the kind of entity that a cursor refers to.
Members
A group of statements like { stmt stmt }.
This cursor kind is used to describe compound statements, e.g. function bodies.
An explicit cast in C (C99 6.5.4) or a C-style cast in C++ (C++ [expr.cast]), which uses the syntax (Type)expr.
For example: (int)f.
Represents an explicit C++ type conversion that uses "functional" notion (C++ [expr.type.conv]).
Example:
x = int(0.5);
[C++ 15] C++ Throw Expression.
This handles 'throw' and 'throw' assignment-expression. When assignment-expression isn't present, Op will be null.
Implements the GNU __null extension, which is a name for a null pointer constant that has integral type (e.g., int or long) and is the same size and alignment as a pointer.
The __null extension is typically only used by system headers, which define NULL as __null in C++ rather than using 0 (which is an integer that may not match the size of a pointer).
A reference to a labeled statement.
This cursor kind is used to describe the jump to "start_over" in the goto statement in the following example:
start_over:
++counter;
goto start_over;
A label reference cursor refers to a label statement.
A labelled statement in a function.
This cursor kind is used to describe the "start_over:" label statement in the following example:
start_over:
++counter;
Represents a C++ lambda expression that produces a local function object.
void abssort(float *x, unsigned N) {
std::sort(x, x + N,
[](float a, float b) {
return std::abs(a) < std::abs(b);
});
}
A reference to a member of a struct, union, or class that occurs in some non-expression context, e.g., a designated initializer.
An Objective-C "bridged" cast expression, which casts between Objective-C pointers and C pointers, transferring ownership in the process.
NSString *str = (__bridge_transfer NSString *)CFCreateString();
A reference to a set of overloaded functions or function templates that has not yet been resolved to a specific function or function template.
An overloaded declaration reference cursor occurs in C++ templates where a dependent name refers to a function. For example:
template<typename T> void swap(T&, T&);
struct X { ... };
void swap(X&, X&);
template<typename T>
void reverse(T* first, T* last) {
while (first < last - 1) {
swap(*first, *--last);
++first;
}
}
struct Y { };
void swap(Y&, Y&);
Here, the identifier "swap" is associated with an overloaded declaration reference. In the template definition, "swap" refers to either of the two "swap" functions declared above, so both results will be available. At instantiation time, "swap" may also refer to other functions found via argument-dependent lookup (e.g., the "swap" function at the end of the example).
The functions clang_getNumOverloadedDecls(
) and
clang_getOverloadedDecl(
) can be used to retrieve the definitions
referenced by this cursor.
Represents a C++0x pack expansion that produces a sequence of expressions.
A pack expansion expression contains a pattern (which itself is an expression) followed by an ellipsis. For example:
template<typename F, typename ...Types>
void forward(F f, Types &&...args) {
f(static_cast<Types&&>(args)...);
}
A parenthesized expression, e.g. "(1)".
This AST node is only formed if full location information is requested.
Represents an expression that computes the length of a parameter pack.
template<typename ...Types>
struct count {
static const unsigned value = sizeof...(Types);
};
A reference to a class template, function template, template template parameter, or class template partial specialization.
Cursor that represents the translation unit itself.
The translation unit cursor exists primarily to act as the root cursor for traversing the contents of a translation unit.
A reference to a type declaration.
A type reference occurs anywhere where a type is named but not declared. For example, given:
typedef unsigned size_type;
size_type size;
The typedef is a declaration of size_type (CXCursor_TypedefDecl), while the type of the variable "size" is referenced. The cursor referenced by the type of size is the typedef for size_type.
A declaration whose specific kind is not exposed via this interface.
Unexposed declarations have the same operations as any other kind of declaration; one can extract their location information, spelling, find their definitions, etc. However, the specific kind of the declaration is not reported.
An expression whose specific kind is not exposed via this interface.
Unexposed expressions have the same operations as any other kind of expression; one can extract their location information, spelling, children, etc. However, the specific kind of the expression is not reported.
A statement whose specific kind is not exposed via this interface.
Unexposed statements have the same operations as any other kind of statement; one can extract their location information, spelling, children, etc. However, the specific kind of the statement is not reported.