Documentation ¶
Index ¶
- type Document
- func (d *Document) ApplyChanges(changes []protocol.TextDocumentContentChangeEvent)
- func (d *Document) ApplyChangesToAst(path string)
- func (d *Document) LookupSymbol(name string, offset int) *stdlib.Symbol
- func (d *Document) PositionToOffset(pos protocol.Position) int
- func (d *Document) SpanToRange(start, _ int) protocol.Range
- func (d *Document) TokenAt(pos protocol.Position) (*HoveredToken, error)
- type DocumentStore
- type HoveredToken
- type ParsedGnoFile
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 ¶
ApplyChangesToAst applies the changes in the Document to the AST.
func (*Document) LookupSymbol ¶ added in v0.7.1
func (*Document) PositionToOffset ¶ added in v0.7.0
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 (s *DocumentStore) DidOpen(params protocol.DidOpenTextDocumentParams) (*Document, error)
type HoveredToken ¶
type ParsedGnoFile ¶
A ParsedGnoFile contains the results of parsing a Gno file.
func NewParsedGnoFile ¶
func NewParsedGnoFile(path, content string) (*ParsedGnoFile, error)
NewParsedGnoFile parses the Gno file with the standard parser, including comments.
Click to show internal directories.
Click to hide internal directories.