Example #1
0
/*
	Retrieve the cursor that represents the given translation unit.

	The translation unit cursor can be used to start traversing the
	various declarations within the given translation unit.
*/
func (tu TranslationUnit) TranslationUnitCursor() Cursor {
	return Cursor{C.clang_getTranslationUnitCursor(tu.c)}
}
Example #2
0
/**
 * \brief Retrieve the cursor that represents the given translation unit.
 *
 * The translation unit cursor can be used to start traversing the
 * various declarations within the given translation unit.
 */
func (tu TranslationUnit) ToCursor() Cursor {
	o := C.clang_getTranslationUnitCursor(tu.c)
	return Cursor{o}
}