tryfunc

package
v0.0.0-...-9cab0d1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncResult

type FuncResult struct {
	*lib.Extent
	Name string
	Type *lib.Extent
}

func (*FuncResult) String

func (f *FuncResult) String() string

type SyntaxInspector

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

func NewSyntaxInspector

func NewSyntaxInspector(pkg *packages.Package) *SyntaxInspector

func (*SyntaxInspector) Inspect

func (i *SyntaxInspector) Inspect(node ast.Node, _ []ast.Node) *TrySyntax

func (*SyntaxInspector) Nodes

func (i *SyntaxInspector) Nodes() []ast.Node

type Translator

type Translator struct{}

func (*Translator) Generate

func (*Translator) Generate(info *lib.FileInfo[*TrySyntax], writer io.Writer) error

func (*Translator) InpectTypes

func (*Translator) InpectTypes(p *packages.Package) []*lib.Extent

func (*Translator) InspectSyntax

func (*Translator) InspectSyntax(p *packages.Package, _ []*lib.Extent) lib.SyntaxInspector[*TrySyntax]

func (*Translator) Run

func (t *Translator) Run(ctx context.Context, rootDir string, firstRun bool) error

type TryStmt

type TryStmt struct {
	*lib.Extent
	RetVars     []*lib.Extent
	AssignToken string
	CallExpr    *lib.Extent
	OuterStmt   *lib.Extent
}

func (*TryStmt) String

func (t *TryStmt) String() string

type TrySyntax

type TrySyntax struct {
	*lib.Extent
	OuterFunc string
	Stmts     []*TryStmt
	Results   []*FuncResult
}

func (*TrySyntax) String

func (t *TrySyntax) String() string

Jump to

Keyboard shortcuts

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