-
Notifications
You must be signed in to change notification settings - Fork 14
/
go118_export.go
executable file
·61 lines (55 loc) · 2.22 KB
/
go118_export.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// export by github.com/goplus/gossa/cmd/qexp
//go:build go1.18
// +build go1.18
package parser
import (
q "go/parser"
"go/constant"
"reflect"
"github.com/goplus/gossa"
)
func init() {
gossa.RegisterPackage(&gossa.Package{
Name: "parser",
Path: "go/parser",
Deps: map[string]string{
"bytes": "bytes",
"errors": "errors",
"fmt": "fmt",
"go/ast": "ast",
"go/internal/typeparams": "typeparams",
"go/scanner": "scanner",
"go/token": "token",
"io": "io",
"io/fs": "fs",
"os": "os",
"path/filepath": "filepath",
"strconv": "strconv",
"strings": "strings",
"unicode": "unicode",
},
Interfaces: map[string]reflect.Type{},
NamedTypes: map[string]gossa.NamedType{
"Mode": {reflect.TypeOf((*q.Mode)(nil)).Elem(), "", ""},
},
AliasTypes: map[string]reflect.Type{},
Vars: map[string]reflect.Value{},
Funcs: map[string]reflect.Value{
"ParseDir": reflect.ValueOf(q.ParseDir),
"ParseExpr": reflect.ValueOf(q.ParseExpr),
"ParseExprFrom": reflect.ValueOf(q.ParseExprFrom),
"ParseFile": reflect.ValueOf(q.ParseFile),
},
TypedConsts: map[string]gossa.TypedConst{
"AllErrors": {reflect.TypeOf(q.AllErrors), constant.MakeInt64(int64(q.AllErrors))},
"DeclarationErrors": {reflect.TypeOf(q.DeclarationErrors), constant.MakeInt64(int64(q.DeclarationErrors))},
"ImportsOnly": {reflect.TypeOf(q.ImportsOnly), constant.MakeInt64(int64(q.ImportsOnly))},
"PackageClauseOnly": {reflect.TypeOf(q.PackageClauseOnly), constant.MakeInt64(int64(q.PackageClauseOnly))},
"ParseComments": {reflect.TypeOf(q.ParseComments), constant.MakeInt64(int64(q.ParseComments))},
"SkipObjectResolution": {reflect.TypeOf(q.SkipObjectResolution), constant.MakeInt64(int64(q.SkipObjectResolution))},
"SpuriousErrors": {reflect.TypeOf(q.SpuriousErrors), constant.MakeInt64(int64(q.SpuriousErrors))},
"Trace": {reflect.TypeOf(q.Trace), constant.MakeInt64(int64(q.Trace))},
},
UntypedConsts: map[string]gossa.UntypedConst{},
})
}