analysis

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analysis

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

func NewAnalysis

func NewAnalysis() *Analysis

func (*Analysis) AddConst

func (a *Analysis) AddConst(name string, expr string)

func (*Analysis) AddFunc

func (a *Analysis) AddFunc(fun *Func) error

func (*Analysis) AddGoType

func (a *Analysis) AddGoType(typ Type) error

func (*Analysis) AddImport

func (a *Analysis) AddImport(alias string, imp string) error

func (*Analysis) AddStruct

func (a *Analysis) AddStruct(st *Struct) error

func (*Analysis) Dump

func (a *Analysis) Dump()

func (*Analysis) Emit

func (a *Analysis) Emit(w *bytes.Buffer)

func (*Analysis) GetGoType

func (a *Analysis) GetGoType(name string) (Type, bool)

func (*Analysis) SetPackage

func (a *Analysis) SetPackage(name string)

type Func

type Func struct {
	Name       string
	Signatures []*Signature
}

func (*Func) DFA

func (s *Func) DFA() *FuncDFA

func (*Func) GetSignatureIndex

func (s *Func) GetSignatureIndex(v *Signature) int

func (*Func) String

func (s *Func) String() string

type FuncDFA

type FuncDFA struct {
	*nfadfa.DFA
	MinArgs int
}

type FuncNFAData

type FuncNFAData struct {
	Signature *Signature
	Param     Param
}

type GoType

type GoType struct {
	Package string
	Name    string
	Ref     bool
	Struct  bool
}

func (GoType) NoRef

func (t GoType) NoRef() GoType

func (GoType) String

func (t GoType) String() string

type Param

type Param struct {
	Name        string
	Type        Type
	HasDefault  bool
	DefaultExpr string
	VarArg      bool
}

type Signature

type Signature struct {
	Params []Param
	Rets   []Type
}

func (*Signature) String

func (s *Signature) String() string

type Struct

type Struct struct {
	Name   string
	Fields []*StructField
}

type StructField

type StructField struct {
	Name string
	Type Type
}

type Type

type Type struct {
	Name    string
	GoType  GoType
	Nilable bool
	Iter    bool
}

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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