clang 20.0.0git
Public Attributes | List of all members
CXCursor Struct Reference

A cursor representing some element in the abstract syntax tree for a translation unit. More...

#include "clang-c/Index.h"

Public Attributes

enum CXCursorKind kind
 
int xdata
 
const void * data [3]
 

Detailed Description

A cursor representing some element in the abstract syntax tree for a translation unit.

The cursor abstraction unifies the different kinds of entities in a program–declaration, statements, expressions, references to declarations, etc.–under a single "cursor" abstraction with a common set of operations. Common operation for a cursor include: getting the physical location in a source file where the cursor points, getting the name associated with a cursor, and retrieving cursors for any child nodes of a particular cursor.

Cursors can be produced in two specific ways. clang_getTranslationUnitCursor() produces a cursor for a translation unit, from which one can use clang_visitChildren() to explore the rest of the translation unit. clang_getCursor() maps from a physical source location to the entity that resides at that location, allowing one to map from the source code into the AST.

Definition at line 2317 of file Index.h.

Member Data Documentation

◆ data

const void* CXCursor::data[3]

Definition at line 2320 of file Index.h.

◆ kind

enum CXCursorKind CXCursor::kind

Definition at line 2318 of file Index.h.

◆ xdata

int CXCursor::xdata

Definition at line 2319 of file Index.h.


The documentation for this struct was generated from the following file: