Documentation ¶
Index ¶
- func CreateLocation(filename string, line, col uint32) *flatbuffers.Builder
- func NewClangClient(cc *grpc.ClientConn) symbol.ClangClient
- func RegisterClangServer(s *grpc.Server, srv symbol.ClangServer)
- type Caller
- type CodeCompleteResults
- type CompleteItem
- func (c *CompleteItem) Abbr() string
- func (c *CompleteItem) Dup() bool
- func (c *CompleteItem) Icase() bool
- func (c *CompleteItem) Info() string
- func (c *CompleteItem) Kind() string
- func (c *CompleteItem) Marshal(builder *flatbuffers.Builder, cs clang.CompletionString) flatbuffers.UOffsetT
- func (c *CompleteItem) Menu() string
- func (c *CompleteItem) Word() string
- type File
- func (f *File) AddCaller(sym, def Location, funcCall bool)
- func (f *File) AddDecl(loc Location)
- func (f *File) AddDefinition(loc, def Location)
- func (f *File) AddHeader(includePath string, headerFile clang.File)
- func (f *File) AddTranslationUnit(buf []byte)
- func (f *File) Flags() []string
- func (f *File) Headers() []*Header
- func (f *File) Name() string
- func (f *File) Serialize() *flatbuffers.Builder
- func (f *File) Symbols() []*Info
- func (f *File) TranslationUnit() []byte
- func (f *File) Unmarshal()
- type FileID
- type Header
- type ID
- type Info
- type Location
- type SymbolCaller
- type SymbolCodeCompleteResults
- type SymbolCompleteItem
- type SymbolFile
- type SymbolHeader
- type SymbolInfo
- type SymbolLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLocation ¶
func CreateLocation(filename string, line, col uint32) *flatbuffers.Builder
CreateLocation creates location data using flatbuffers binary.
func NewClangClient ¶
func NewClangClient(cc *grpc.ClientConn) symbol.ClangClient
NewClangClient retern the new symbol.ClangClient.
func RegisterClangServer ¶
func RegisterClangServer(s *grpc.Server, srv symbol.ClangServer)
RegisterClangServer register a service and its implementation to the gRPC server.
Types ¶
type Caller ¶
type Caller struct {
// contains filtered or unexported fields
}
Caller represents a location of caller function.
table Caller { Location: Location (required); FuncCall: bool = false; // -> byte }
type CodeCompleteResults ¶
type CodeCompleteResults struct {
// contains filtered or unexported fields
}
CodeCompleteResults represents a list of vim complete-items dictionary.
table CodeCompleteResults { Results: [CompleteItem]; }
func NewCodeCompleteResults ¶
func NewCodeCompleteResults(v *symbol.CodeCompleteResults) *CodeCompleteResults
NewCodeCompleteResults returns the flatbuffers binary of CodeCompleteResults.
func (*CodeCompleteResults) Marshal ¶
func (c *CodeCompleteResults) Marshal(v *clang.CodeCompleteResults) *flatbuffers.Builder
Marshal returns the flatbuffers binary encoding of clang.CodeCompleteResults v.
func (*CodeCompleteResults) Results ¶
func (c *CodeCompleteResults) Results() []CompleteItem
Results return the slice of CompleteItem.
type CompleteItem ¶
type CompleteItem struct {
// contains filtered or unexported fields
}
CompleteItem represents a vim complete-items dictionary.
table CompleteItem { Word: string (required); // -> []byte Abbr: string; // -> []byte Menu: string; // -> []byte Info: string; // -> []byte Kind: string; // -> []byte Icase: bool; // -> byte Dup: bool; // -> byte }
func (*CompleteItem) Abbr ¶
func (c *CompleteItem) Abbr() string
Abbr return the abbreviation of "word", when not empty it is used in the menu instead of "word".
func (*CompleteItem) Dup ¶
func (c *CompleteItem) Dup() bool
Dup return the when non-zero this match will be added even when an item with the same word is already present.
func (*CompleteItem) Icase ¶
func (c *CompleteItem) Icase() bool
Icase return the more information about the item, can be displayed in a preview window.
func (*CompleteItem) Info ¶
func (c *CompleteItem) Info() string
Info return the more information about the item, can be displayed in a preview window.
func (*CompleteItem) Kind ¶
func (c *CompleteItem) Kind() string
Kind return the single letter indicating the type of completion.
func (*CompleteItem) Marshal ¶
func (c *CompleteItem) Marshal(builder *flatbuffers.Builder, cs clang.CompletionString) flatbuffers.UOffsetT
Marshal returns the flatbuffers binary encoding of cs.
func (*CompleteItem) Menu ¶
func (c *CompleteItem) Menu() string
Menu return the extra text for the popup menu, displayed after "word" or "abbr".
func (*CompleteItem) Word ¶
func (c *CompleteItem) Word() string
Word return the text that will inserted, mandatory.
type File ¶
type File struct {
// contains filtered or unexported fields
}
File represents a C/C++ source file.
table File { Name: string; TranslationUnit: string; Symbols: [Info]; Headers: [Header]; Includes: [string]; }
func GetRootAsFile ¶
func GetRootAsFile(buf []byte, offset flatbuffers.UOffsetT) *File
GetRootAsFile gets the root of flatbuffers binary.
func (*File) AddDefinition ¶
AddDefinition add definition data into File.
func (*File) AddTranslationUnit ¶
AddTranslationUnit add TranslationUnit data to File.
func (*File) Serialize ¶
func (f *File) Serialize() *flatbuffers.Builder
Serialize serializes the File.
func (*File) TranslationUnit ¶
TranslationUnit return the libclang translation unit data.
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
Header represents a location of include header file.
table Header { FileID: string (id: 0, required, key); // -> []byte Mtime: long (id: 1); // time.Time.Unix(): int64 }
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
Info represents a location of C/C++ cursor symbol information.
table Info { ID: string; Decls: [Location]; Def: Location; }
type Location ¶
type Location struct {
// contains filtered or unexported fields
}
Location location of symbol. TODO(zchee): method receiver is pointer for location?
table Location { FileName: string; Line: uint; Col: uint = 0; Offset: uint; USR: string; }
func FromCursor ¶
FromCursor return the location of symbol from cursor.
type SymbolCodeCompleteResults ¶
type SymbolCodeCompleteResults = symbol.CodeCompleteResults
SymbolCodeCompleteResults type alias of symbol.CodeCompleteResults.
type SymbolCompleteItem ¶
type SymbolCompleteItem = symbol.CompleteItem
SymbolCompleteItem type alias of symbol.CompleteItem.
type SymbolLocation ¶
SymbolLocation type alias of symbol.Location.