Skip to main content
Module

x/libclang/mod.ts>CXCompletionString

Deno FFI bindings for libclang
Go to Latest
class CXCompletionString
import { CXCompletionString } from "https://deno.land/x/libclang@1.0.0-beta.8/mod.ts";

A semantic string that describes a code-completion result.

A semantic string that describes the formatting of a code-completion result as a single "template" of text that should be inserted into the source buffer when a particular code-completion result is selected. Each semantic string is made up of some number of "chunks", each of which contains some text along with a description of what that text means, e.g., the name of the entity being referenced, whether the text chunk is part of the template, or whether it is a "placeholder" that the user should replace with actual code,of a specific kind. See CXCompletionChunkKind for a description of the different kinds of chunks.

Constructors

new
CXCompletionString(pointer: Deno.PointerValue)

Methods

getAnnotation(index: number): string

Retrieve the annotation associated with this completion string.

Determine the availability of the entity that this code-completion string refers to.

getBriefComment(): string

Retrieve the brief documentation comment attached to the declaration that corresponds to this completion string.

Retrieve the completion string associated with a particular chunk within this completion string.

Determine the kind of a particular chunk within this completion string.

getChunkText(index: number): string

Retrieve the text associated with a particular chunk within a completion string.

Retrieve the number of annotations associated with this completion string.

Retrieve the number of chunks in this code-completion string.

getParent(): string

Retrieve the parent context of this 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.

getPriority(): number

Determine the priority of this code completion.

The priority of a code completion indicates how likely it is that this particular completion is the completion that the user will select. The priority is selected by various internal heuristics.