Documentation
¶
Index ¶
- func Complete(src string, pos token.Pos, conf *Config) ([]string, int, int)
- func Format(src string) (string, error)
- func InspectIdent(src string, pos token.Pos, conf *Config) (doc, query string)
- func SetLGOImporter(im types.Importer)
- func SetPackageArchiveInstaller(i PackageArchiveInstaller)
- type Config
- type ConvertResult
- type ErrorList
- type PackageArchiveInstaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Complete ¶
Complete returns a list of candidates of code completion.
func Format ¶
Format formats lgo src code like go fmt command.
func InspectIdent ¶
InspectIdent shows a document or a query for go doc command for the identifier at pos.
func SetLGOImporter ¶
SetLGOImporter sets a global types.Importer used in this package. This method is used in cmd/lgo-internal to install missing .a files to the system.
func SetPackageArchiveInstaller ¶
func SetPackageArchiveInstaller(i PackageArchiveInstaller)
SetPackageArchiveInstaller sets a global PackageArchiveInstaller used in the current process.
Types ¶
type Config ¶
type Config struct {
Olds []types.Object
OldImports []*types.PkgName
DefPrefix string
RefPrefix string
LgoPkgPath string
AutoExitCode bool
RegisterVars bool
}
A Config node controls the spec of Convert function.
type ConvertResult ¶
type ConvertResult struct {
Src string
Pkg *types.Package
Checker *types.Checker
Imports []*types.PkgName
// A list of package paths imported in the final Src.
FinalDeps []string
Err error
}
A ConvertResult is a result of code conversion by Convert.
func Convert ¶
func Convert(src string, conf *Config) *ConvertResult
Convert converts a lgo source to a valid Go source.
Source Files
¶
- autoexit.go
- complete.go
- converter.go
- format.go
- namepicker.go
- rewriteexpr.go
Click to show internal directories.
Click to hide internal directories.