document

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Document

type Document struct {
	*scip.Document
	// contains filtered or unexported fields
}

func NewDocument

func NewDocument(
	relative string,
	pkg *packages.Package,
	pkgSymbols *lookup.Package,
) *Document

func (*Document) AppendSymbolReference

func (d *Document) AppendSymbolReference(symbol string, rng []int32, overrideType types.Type)

func (*Document) DeclareSymbols

func (d *Document) DeclareSymbols()

DeclareSymbols will put all of the symbol information into the scip document itself.

func (*Document) GetSymbol

func (d *Document) GetSymbol(pos token.Pos) (string, bool)

func (*Document) NewDefinition

func (d *Document) NewDefinition(symbol string, rng []int32)

NewDefinition emits a scip.Occurence ONLY. This will not emit a new symbol. You must do that using DeclareNewSymbol[ForPos]

func (*Document) SetNewSymbol

func (d *Document) SetNewSymbol(
	symbol string,
	parent ast.Node,
	ident *ast.Ident,
)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL