loader

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File added in v0.1.2

type File struct {
	// File is the parsed file.
	File *ast.File
	// Fset is the fileset that was used when parsing the file.
	Fset *token.FileSet
	// Pos is the cursor position translated to a token.Pos.
	Pos token.Pos
	// ASTPath is the path containing the node at Pos.
	ASTPath []ast.Node
}

func (File) IndentLevel added in v0.1.2

func (f File) IndentLevel() int

type Loader

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

func New

func New(
	contents file.Contents,
	cursorOffset int,
) *Loader

func (*Loader) LoadPackage added in v0.1.2

func (l *Loader) LoadPackage() (*packages.Package, error)

func (*Loader) ParseFile

func (l *Loader) ParseFile() (File, error)

Jump to

Keyboard shortcuts

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