github.com/goplus/gossa@v0.3.25/pkg/go/parser/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 parser
     7  
     8  import (
     9  	q "go/parser"
    10  
    11  	"go/constant"
    12  	"reflect"
    13  
    14  	"github.com/goplus/gossa"
    15  )
    16  
    17  func init() {
    18  	gossa.RegisterPackage(&gossa.Package{
    19  		Name: "parser",
    20  		Path: "go/parser",
    21  		Deps: map[string]string{
    22  			"bytes":                  "bytes",
    23  			"errors":                 "errors",
    24  			"fmt":                    "fmt",
    25  			"go/ast":                 "ast",
    26  			"go/internal/typeparams": "typeparams",
    27  			"go/scanner":             "scanner",
    28  			"go/token":               "token",
    29  			"io":                     "io",
    30  			"io/fs":                  "fs",
    31  			"os":                     "os",
    32  			"path/filepath":          "filepath",
    33  			"strconv":                "strconv",
    34  			"strings":                "strings",
    35  			"unicode":                "unicode",
    36  		},
    37  		Interfaces: map[string]reflect.Type{},
    38  		NamedTypes: map[string]gossa.NamedType{
    39  			"Mode": {reflect.TypeOf((*q.Mode)(nil)).Elem(), "", ""},
    40  		},
    41  		AliasTypes: map[string]reflect.Type{},
    42  		Vars:       map[string]reflect.Value{},
    43  		Funcs: map[string]reflect.Value{
    44  			"ParseDir":      reflect.ValueOf(q.ParseDir),
    45  			"ParseExpr":     reflect.ValueOf(q.ParseExpr),
    46  			"ParseExprFrom": reflect.ValueOf(q.ParseExprFrom),
    47  			"ParseFile":     reflect.ValueOf(q.ParseFile),
    48  		},
    49  		TypedConsts: map[string]gossa.TypedConst{
    50  			"AllErrors":            {reflect.TypeOf(q.AllErrors), constant.MakeInt64(int64(q.AllErrors))},
    51  			"DeclarationErrors":    {reflect.TypeOf(q.DeclarationErrors), constant.MakeInt64(int64(q.DeclarationErrors))},
    52  			"ImportsOnly":          {reflect.TypeOf(q.ImportsOnly), constant.MakeInt64(int64(q.ImportsOnly))},
    53  			"PackageClauseOnly":    {reflect.TypeOf(q.PackageClauseOnly), constant.MakeInt64(int64(q.PackageClauseOnly))},
    54  			"ParseComments":        {reflect.TypeOf(q.ParseComments), constant.MakeInt64(int64(q.ParseComments))},
    55  			"SkipObjectResolution": {reflect.TypeOf(q.SkipObjectResolution), constant.MakeInt64(int64(q.SkipObjectResolution))},
    56  			"SpuriousErrors":       {reflect.TypeOf(q.SpuriousErrors), constant.MakeInt64(int64(q.SpuriousErrors))},
    57  			"Trace":                {reflect.TypeOf(q.Trace), constant.MakeInt64(int64(q.Trace))},
    58  		},
    59  		UntypedConsts: map[string]gossa.UntypedConst{},
    60  	})
    61  }