github.com/goplus/gossa@v0.3.25/pkg/go/ast/go117_export.go (about) 1 // export by github.com/goplus/gossa/cmd/qexp 2 3 //go:build go1.17 && !go1.18 4 // +build go1.17,!go1.18 5 6 package ast 7 8 import ( 9 q "go/ast" 10 11 "go/constant" 12 "reflect" 13 14 "github.com/goplus/gossa" 15 ) 16 17 func init() { 18 gossa.RegisterPackage(&gossa.Package{ 19 Name: "ast", 20 Path: "go/ast", 21 Deps: map[string]string{ 22 "bytes": "bytes", 23 "fmt": "fmt", 24 "go/scanner": "scanner", 25 "go/token": "token", 26 "io": "io", 27 "os": "os", 28 "reflect": "reflect", 29 "sort": "sort", 30 "strconv": "strconv", 31 "strings": "strings", 32 }, 33 Interfaces: map[string]reflect.Type{ 34 "Decl": reflect.TypeOf((*q.Decl)(nil)).Elem(), 35 "Expr": reflect.TypeOf((*q.Expr)(nil)).Elem(), 36 "Node": reflect.TypeOf((*q.Node)(nil)).Elem(), 37 "Spec": reflect.TypeOf((*q.Spec)(nil)).Elem(), 38 "Stmt": reflect.TypeOf((*q.Stmt)(nil)).Elem(), 39 "Visitor": reflect.TypeOf((*q.Visitor)(nil)).Elem(), 40 }, 41 NamedTypes: map[string]gossa.NamedType{ 42 "ArrayType": {reflect.TypeOf((*q.ArrayType)(nil)).Elem(), "", "End,Pos,exprNode"}, 43 "AssignStmt": {reflect.TypeOf((*q.AssignStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 44 "BadDecl": {reflect.TypeOf((*q.BadDecl)(nil)).Elem(), "", "End,Pos,declNode"}, 45 "BadExpr": {reflect.TypeOf((*q.BadExpr)(nil)).Elem(), "", "End,Pos,exprNode"}, 46 "BadStmt": {reflect.TypeOf((*q.BadStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 47 "BasicLit": {reflect.TypeOf((*q.BasicLit)(nil)).Elem(), "", "End,Pos,exprNode"}, 48 "BinaryExpr": {reflect.TypeOf((*q.BinaryExpr)(nil)).Elem(), "", "End,Pos,exprNode"}, 49 "BlockStmt": {reflect.TypeOf((*q.BlockStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 50 "BranchStmt": {reflect.TypeOf((*q.BranchStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 51 "CallExpr": {reflect.TypeOf((*q.CallExpr)(nil)).Elem(), "", "End,Pos,exprNode"}, 52 "CaseClause": {reflect.TypeOf((*q.CaseClause)(nil)).Elem(), "", "End,Pos,stmtNode"}, 53 "ChanDir": {reflect.TypeOf((*q.ChanDir)(nil)).Elem(), "", ""}, 54 "ChanType": {reflect.TypeOf((*q.ChanType)(nil)).Elem(), "", "End,Pos,exprNode"}, 55 "CommClause": {reflect.TypeOf((*q.CommClause)(nil)).Elem(), "", "End,Pos,stmtNode"}, 56 "Comment": {reflect.TypeOf((*q.Comment)(nil)).Elem(), "", "End,Pos"}, 57 "CommentGroup": {reflect.TypeOf((*q.CommentGroup)(nil)).Elem(), "", "End,Pos,Text"}, 58 "CommentMap": {reflect.TypeOf((*q.CommentMap)(nil)).Elem(), "Comments,Filter,String,Update,addComment", ""}, 59 "CompositeLit": {reflect.TypeOf((*q.CompositeLit)(nil)).Elem(), "", "End,Pos,exprNode"}, 60 "DeclStmt": {reflect.TypeOf((*q.DeclStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 61 "DeferStmt": {reflect.TypeOf((*q.DeferStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 62 "Ellipsis": {reflect.TypeOf((*q.Ellipsis)(nil)).Elem(), "", "End,Pos,exprNode"}, 63 "EmptyStmt": {reflect.TypeOf((*q.EmptyStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 64 "ExprStmt": {reflect.TypeOf((*q.ExprStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 65 "Field": {reflect.TypeOf((*q.Field)(nil)).Elem(), "", "End,Pos"}, 66 "FieldFilter": {reflect.TypeOf((*q.FieldFilter)(nil)).Elem(), "", ""}, 67 "FieldList": {reflect.TypeOf((*q.FieldList)(nil)).Elem(), "", "End,NumFields,Pos"}, 68 "File": {reflect.TypeOf((*q.File)(nil)).Elem(), "", "End,Pos"}, 69 "Filter": {reflect.TypeOf((*q.Filter)(nil)).Elem(), "", ""}, 70 "ForStmt": {reflect.TypeOf((*q.ForStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 71 "FuncDecl": {reflect.TypeOf((*q.FuncDecl)(nil)).Elem(), "", "End,Pos,declNode"}, 72 "FuncLit": {reflect.TypeOf((*q.FuncLit)(nil)).Elem(), "", "End,Pos,exprNode"}, 73 "FuncType": {reflect.TypeOf((*q.FuncType)(nil)).Elem(), "", "End,Pos,exprNode"}, 74 "GenDecl": {reflect.TypeOf((*q.GenDecl)(nil)).Elem(), "", "End,Pos,declNode"}, 75 "GoStmt": {reflect.TypeOf((*q.GoStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 76 "Ident": {reflect.TypeOf((*q.Ident)(nil)).Elem(), "", "End,IsExported,Pos,String,exprNode"}, 77 "IfStmt": {reflect.TypeOf((*q.IfStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 78 "ImportSpec": {reflect.TypeOf((*q.ImportSpec)(nil)).Elem(), "", "End,Pos,specNode"}, 79 "Importer": {reflect.TypeOf((*q.Importer)(nil)).Elem(), "", ""}, 80 "IncDecStmt": {reflect.TypeOf((*q.IncDecStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 81 "IndexExpr": {reflect.TypeOf((*q.IndexExpr)(nil)).Elem(), "", "End,Pos,exprNode"}, 82 "InterfaceType": {reflect.TypeOf((*q.InterfaceType)(nil)).Elem(), "", "End,Pos,exprNode"}, 83 "KeyValueExpr": {reflect.TypeOf((*q.KeyValueExpr)(nil)).Elem(), "", "End,Pos,exprNode"}, 84 "LabeledStmt": {reflect.TypeOf((*q.LabeledStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 85 "MapType": {reflect.TypeOf((*q.MapType)(nil)).Elem(), "", "End,Pos,exprNode"}, 86 "MergeMode": {reflect.TypeOf((*q.MergeMode)(nil)).Elem(), "", ""}, 87 "ObjKind": {reflect.TypeOf((*q.ObjKind)(nil)).Elem(), "String", ""}, 88 "Object": {reflect.TypeOf((*q.Object)(nil)).Elem(), "", "Pos"}, 89 "Package": {reflect.TypeOf((*q.Package)(nil)).Elem(), "", "End,Pos"}, 90 "ParenExpr": {reflect.TypeOf((*q.ParenExpr)(nil)).Elem(), "", "End,Pos,exprNode"}, 91 "RangeStmt": {reflect.TypeOf((*q.RangeStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 92 "ReturnStmt": {reflect.TypeOf((*q.ReturnStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 93 "Scope": {reflect.TypeOf((*q.Scope)(nil)).Elem(), "", "Insert,Lookup,String"}, 94 "SelectStmt": {reflect.TypeOf((*q.SelectStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 95 "SelectorExpr": {reflect.TypeOf((*q.SelectorExpr)(nil)).Elem(), "", "End,Pos,exprNode"}, 96 "SendStmt": {reflect.TypeOf((*q.SendStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 97 "SliceExpr": {reflect.TypeOf((*q.SliceExpr)(nil)).Elem(), "", "End,Pos,exprNode"}, 98 "StarExpr": {reflect.TypeOf((*q.StarExpr)(nil)).Elem(), "", "End,Pos,exprNode"}, 99 "StructType": {reflect.TypeOf((*q.StructType)(nil)).Elem(), "", "End,Pos,exprNode"}, 100 "SwitchStmt": {reflect.TypeOf((*q.SwitchStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 101 "TypeAssertExpr": {reflect.TypeOf((*q.TypeAssertExpr)(nil)).Elem(), "", "End,Pos,exprNode"}, 102 "TypeSpec": {reflect.TypeOf((*q.TypeSpec)(nil)).Elem(), "", "End,Pos,specNode"}, 103 "TypeSwitchStmt": {reflect.TypeOf((*q.TypeSwitchStmt)(nil)).Elem(), "", "End,Pos,stmtNode"}, 104 "UnaryExpr": {reflect.TypeOf((*q.UnaryExpr)(nil)).Elem(), "", "End,Pos,exprNode"}, 105 "ValueSpec": {reflect.TypeOf((*q.ValueSpec)(nil)).Elem(), "", "End,Pos,specNode"}, 106 }, 107 AliasTypes: map[string]reflect.Type{}, 108 Vars: map[string]reflect.Value{}, 109 Funcs: map[string]reflect.Value{ 110 "FileExports": reflect.ValueOf(q.FileExports), 111 "FilterDecl": reflect.ValueOf(q.FilterDecl), 112 "FilterFile": reflect.ValueOf(q.FilterFile), 113 "FilterPackage": reflect.ValueOf(q.FilterPackage), 114 "Fprint": reflect.ValueOf(q.Fprint), 115 "Inspect": reflect.ValueOf(q.Inspect), 116 "IsExported": reflect.ValueOf(q.IsExported), 117 "MergePackageFiles": reflect.ValueOf(q.MergePackageFiles), 118 "NewCommentMap": reflect.ValueOf(q.NewCommentMap), 119 "NewIdent": reflect.ValueOf(q.NewIdent), 120 "NewObj": reflect.ValueOf(q.NewObj), 121 "NewPackage": reflect.ValueOf(q.NewPackage), 122 "NewScope": reflect.ValueOf(q.NewScope), 123 "NotNilFilter": reflect.ValueOf(q.NotNilFilter), 124 "PackageExports": reflect.ValueOf(q.PackageExports), 125 "Print": reflect.ValueOf(q.Print), 126 "SortImports": reflect.ValueOf(q.SortImports), 127 "Walk": reflect.ValueOf(q.Walk), 128 }, 129 TypedConsts: map[string]gossa.TypedConst{ 130 "Bad": {reflect.TypeOf(q.Bad), constant.MakeInt64(int64(q.Bad))}, 131 "Con": {reflect.TypeOf(q.Con), constant.MakeInt64(int64(q.Con))}, 132 "FilterFuncDuplicates": {reflect.TypeOf(q.FilterFuncDuplicates), constant.MakeInt64(int64(q.FilterFuncDuplicates))}, 133 "FilterImportDuplicates": {reflect.TypeOf(q.FilterImportDuplicates), constant.MakeInt64(int64(q.FilterImportDuplicates))}, 134 "FilterUnassociatedComments": {reflect.TypeOf(q.FilterUnassociatedComments), constant.MakeInt64(int64(q.FilterUnassociatedComments))}, 135 "Fun": {reflect.TypeOf(q.Fun), constant.MakeInt64(int64(q.Fun))}, 136 "Lbl": {reflect.TypeOf(q.Lbl), constant.MakeInt64(int64(q.Lbl))}, 137 "Pkg": {reflect.TypeOf(q.Pkg), constant.MakeInt64(int64(q.Pkg))}, 138 "RECV": {reflect.TypeOf(q.RECV), constant.MakeInt64(int64(q.RECV))}, 139 "SEND": {reflect.TypeOf(q.SEND), constant.MakeInt64(int64(q.SEND))}, 140 "Typ": {reflect.TypeOf(q.Typ), constant.MakeInt64(int64(q.Typ))}, 141 "Var": {reflect.TypeOf(q.Var), constant.MakeInt64(int64(q.Var))}, 142 }, 143 UntypedConsts: map[string]gossa.UntypedConst{}, 144 }) 145 }