astutil

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnonymousFieldName

func AnonymousFieldName(expr ast.Expr) string

func BuildStructTree

func BuildStructTree(structName string, filename string, src interface{}) (*xast.TopNode, error)

func FullName

func FullName(expr ast.Expr) string

map[string]Foo parse to map[string]Foo

func IsSysInnerType

func IsSysInnerType(typ string) bool

func MustOpenAst

func MustOpenAst(filename string, src interface{}, mode parser.Mode) (*token.FileSet, *ast.File)

func SimpleName

func SimpleName(expr ast.Expr) string

map[string]Foo parse to Foo, string parse to string

func SystemType

func SystemType(expr ast.Expr) (string, bool)

System type

func VarType

func VarType(expr interface{}) string

func VarValue

func VarValue(expr ast.Expr) (token.Token, string)

func WalkTypeSpec

func WalkTypeSpec(ctx context.Context, parentName string, typeSpec ast.Spec, walkNodeFuncs ...WalkNodeFunc)

Types

type WalkNodeFunc

type WalkNodeFunc func(ctx context.Context, linkName string, leafIdent ast.Expr) (walkContinue bool)

ast parser

func FilterRepeatMiddle

func FilterRepeatMiddle(walkNodeFuncs ...WalkNodeFunc) WalkNodeFunc

func RecycleCheckMiddle

func RecycleCheckMiddle(walkNodeFuncs ...WalkNodeFunc) WalkNodeFunc

Jump to

Keyboard shortcuts

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