Documentation
¶
Index ¶
- func IsDocDeprecated(docs []string) bool
- type Document
- func (d *Document) GetSymbol(pos token.Pos) (string, bool)
- func (d *Document) SetNewSymbol(symbol string, parent ast.Node, ident *ast.Ident)
- func (d *Document) SetNewSymbolForPos(symbol string, parent ast.Node, ident *ast.Ident, pos token.Pos)
- func (d *Document) SetSymbolInformation(pos token.Pos, info *scip.SymbolInformation)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDocDeprecated ¶
IsDocDeprecated reports whether the documentation strings contain a paragraph starting with "Deprecated:" per Go convention.
Types ¶
type Document ¶
type Document struct {
// Document relative path. To be used for scip.Document
RelativePath string
// The occurrence for `package foo` at the top of a Go file.
// It could be a definition or a reference, depending on the package structure.
// It doesn't get traversed in the same way as other parts of the tree,
// so we special case it here. It must get added to the occurences when
// creating a visitors.fileVisitor
PackageOccurrence *scip.Occurrence
// contains filtered or unexported fields
}
func NewDocument ¶
func (*Document) SetNewSymbol ¶
SetNewSymbol declares a new symbol and tracks it within a Document.
NOTE: Does NOT emit a new occurrence
func (*Document) SetNewSymbolForPos ¶
func (d *Document) SetNewSymbolForPos( symbol string, parent ast.Node, ident *ast.Ident, pos token.Pos, )
SetNewSymbolForPos declares a new symbol and tracks it within a Document but allows for an override of the position. Generally speaking, you should use DeclareNewSymbol instead (since it will calculate the pos for most cases)
NOTE: Does NOT emit a new occurrence
func (*Document) SetSymbolInformation ¶
func (d *Document) SetSymbolInformation( pos token.Pos, info *scip.SymbolInformation, )
SetSymbolInformation registers a pre-built SymbolInformation at the given position.
Click to show internal directories.
Click to hide internal directories.