symbols

package
v0.18.0-pre.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package symbols defines the serializable index of package symbols extracted from parsed package files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	Files   []protocol.DocumentURI // package files
	Symbols [][]Symbol             // symbols in each file
}

A Package holds information about symbols declared by each file of a package.

The symbols included are: package-level declarations, and fields and methods of type declarations.

func Decode

func Decode(data []byte) *Package

Decode decodes data from Package.Encode.

func New

func New(files []*parsego.File) *Package

New returns a new Package summarizing symbols in the given files.

func (*Package) Encode

func (pkg *Package) Encode() []byte

Encode encodes the package.

type Symbol

type Symbol struct {
	Name  string
	Kind  protocol.SymbolKind
	Range protocol.Range
}

Symbol holds a precomputed symbol value. This is a subset of the information in the full protocol.SymbolInformation struct to reduce the size of each symbol.

Jump to

Keyboard shortcuts

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