store

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 12 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 {
	URI     protocol.DocumentURI
	Path    string
	Content string
	Lines   []string
	Pgf     *ParsedGnoFile
}

Document represents an opened Gno file.

func (*Document) ApplyChanges

func (d *Document) ApplyChanges(changes []protocol.TextDocumentContentChangeEvent)

func (*Document) ApplyChangesToAst

func (d *Document) ApplyChangesToAst(path string)

func (*Document) SpanToRange

func (d *Document) SpanToRange(start, _ int) protocol.Range

func (*Document) TokenAt

func (d *Document) TokenAt(pos protocol.Position) (*HoveredToken, error)

type DocumentStore

type DocumentStore struct {
	// contains filtered or unexported fields
}

DocumentStore holds all opened documents.

func NewDocumentStore

func NewDocumentStore() *DocumentStore

func (*DocumentStore) Close

func (s *DocumentStore) Close(uri protocol.DocumentURI)

func (*DocumentStore) DidOpen

func (*DocumentStore) Get

func (s *DocumentStore) Get(docuri uri.URI) (*Document, bool)

type HoveredToken

type HoveredToken struct {
	Text  string
	Start int
	End   int
}

type ParsedGnoFile

type ParsedGnoFile struct {
	File *ast.File
}

A ParsedGnoFile contains the results of parsing a Gno file.

func NewParsedGnoFile

func NewParsedGnoFile(path string) (*ParsedGnoFile, error)

Jump to

Keyboard shortcuts

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