/*
	Retrieve the parent context of the given completion string.

	The parent context of a completion string is the semantic parent of
	the declaration (if any) that the code completion represents. For example,
	a code completion for an Objective-C method would have the method's class
	or protocol as its context.

	Parameter completion_string The code completion string whose parent is
	being queried.

	Parameter kind DEPRECATED: always set to CXCursor_NotImplemented if non-NULL.

	Returns The name of the completion parent, e.g., "NSObject" if
	the completion string represents a method in the NSObject class.
*/
func (cs CompletionString) Parent(kind *CursorKind) string {
	var cp_kind C.enum_CXCursorKind
	if kind != nil {
		cp_kind = C.enum_CXCursorKind(*kind)
	}

	o := cxstring{C.clang_getCompletionParent(cs.c, &cp_kind)}
	defer o.Dispose()

	return o.String()
}
Exemple #2
0
func (ck CursorKind) Spelling() string {
	o := cxstring{C.clang_getCursorKindSpelling(C.enum_CXCursorKind(ck))}
	defer o.Dispose()

	return o.String()
}
Exemple #3
0
// * Determine whether the given cursor represents a preprocessing element, such as a preprocessor directive or macro instantiation.
func (ck CursorKind) IsPreprocessing() bool {
	o := C.clang_isPreprocessing(C.enum_CXCursorKind(ck))

	return o != C.uint(0)
}
Exemple #4
0
// * Determine whether the given cursor represents a currently unexposed piece of the AST (e.g., CXCursor_UnexposedStmt).
func (ck CursorKind) IsUnexposed() bool {
	o := C.clang_isUnexposed(C.enum_CXCursorKind(ck))

	return o != C.uint(0)
}
Exemple #5
0
// Determine whether the given cursor kind represents an invalid cursor.
func (ck CursorKind) IsInvalid() bool {
	o := C.clang_isInvalid(C.enum_CXCursorKind(ck))

	return o != C.uint(0)
}
Exemple #6
0
// Determine whether the given cursor kind represents a translation unit.
func (ck CursorKind) IsTranslationUnit() bool {
	o := C.clang_isTranslationUnit(C.enum_CXCursorKind(ck))

	return o != C.uint(0)
}
Exemple #7
0
// Determine whether the given cursor kind represents an attribute.
func (ck CursorKind) IsAttribute() bool {
	o := C.clang_isAttribute(C.enum_CXCursorKind(ck))

	return o != C.uint(0)
}
Exemple #8
0
// Determine whether the given cursor kind represents a statement.
func (ck CursorKind) IsStatement() bool {
	o := C.clang_isStatement(C.enum_CXCursorKind(ck))

	return o != C.uint(0)
}
Exemple #9
0
// Determine whether the given cursor kind represents an expression.
func (ck CursorKind) IsExpression() bool {
	o := C.clang_isExpression(C.enum_CXCursorKind(ck))

	return o != C.uint(0)
}
Exemple #10
0
/*
	Determine whether the given cursor kind represents a simple
	reference.

	Note that other kinds of cursors (such as expressions) can also refer to
	other cursors. Use clang_getCursorReferenced() to determine whether a
	particular cursor refers to another entity.
*/
func (ck CursorKind) IsReference() bool {
	o := C.clang_isReference(C.enum_CXCursorKind(ck))

	return o != C.uint(0)
}
Exemple #11
0
// Determine whether the given cursor kind represents a declaration.
func (ck CursorKind) IsDeclaration() bool {
	o := C.clang_isDeclaration(C.enum_CXCursorKind(ck))

	return o != C.uint(0)
}