Skip to content

Commit 919484d

Browse files
authored
Merge pull request #312 from visualfc/gop2
gop v1.3.8
2 parents 10aaae3 + 04d2feb commit 919484d

File tree

9 files changed

+37
-9
lines changed

9 files changed

+37
-9
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.16
55
require (
66
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00
77
github.com/goplus/gogen v1.16.9
8-
github.com/goplus/gop v1.3.7
8+
github.com/goplus/gop v1.3.8
99
github.com/goplus/mod v0.13.17
1010
github.com/goplus/reflectx v1.3.2
1111
github.com/modern-go/reflect2 v1.0.2

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3
77
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
88
github.com/goplus/gogen v1.16.9 h1:BRNAsRzdyMcLBOLUe6+suVMmOe+D2HLfF7mAkS4/QW4=
99
github.com/goplus/gogen v1.16.9/go.mod h1:6TQYbabXDF9LCdDkOOzHmfg1R4ENfXQ3XpHa9RhTSD8=
10-
github.com/goplus/gop v1.3.7 h1:en4/32AI75EQy8xnkkb6kMdF+yHaNUdEcoYeSOb3nGk=
11-
github.com/goplus/gop v1.3.7/go.mod h1:JjUJ8q9mzDxai6zbWheGv08qAK1WtRKCvIG8cisjOG8=
10+
github.com/goplus/gop v1.3.8 h1:+FJ7/yE305r0rMveQsZYUZ1WmqQ8gqnRxoaDxmEFvvE=
11+
github.com/goplus/gop v1.3.8/go.mod h1:JjUJ8q9mzDxai6zbWheGv08qAK1WtRKCvIG8cisjOG8=
1212
github.com/goplus/llgo v0.10.1/go.mod h1:YfOHsT/g3lc9b4GclLj812YzdSsJr0kd3CCB830TqHE=
1313
github.com/goplus/mod v0.13.17 h1:aWp14xosENrh7t0/0qcIejDmQEiTgI3ou2+KoLDlSlE=
1414
github.com/goplus/mod v0.13.17/go.mod h1:XlHf8mnQ4QkRDX14Of2tpywuHDd+JVpPStvh3egog+0=

pkg/github.com/goplus/gop/tpl/cl/export.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,22 @@ func init() {
2020
"github.com/goplus/gop/tpl/matcher": "matcher",
2121
"github.com/goplus/gop/tpl/token": "token",
2222
"github.com/qiniu/x/errors": "errors",
23+
"os": "os",
2324
"strconv": "strconv",
2425
},
2526
Interfaces: map[string]reflect.Type{},
2627
NamedTypes: map[string]reflect.Type{
28+
"Config": reflect.TypeOf((*q.Config)(nil)).Elem(),
2729
"Result": reflect.TypeOf((*q.Result)(nil)).Elem(),
2830
},
2931
AliasTypes: map[string]reflect.Type{},
3032
Vars: map[string]reflect.Value{
3133
"ErrNoDocFound": reflect.ValueOf(&q.ErrNoDocFound),
3234
},
3335
Funcs: map[string]reflect.Value{
34-
"New": reflect.ValueOf(q.New),
35-
"NewEx": reflect.ValueOf(q.NewEx),
36+
"LogConflict": reflect.ValueOf(q.LogConflict),
37+
"New": reflect.ValueOf(q.New),
38+
"NewEx": reflect.ValueOf(q.NewEx),
3639
},
3740
TypedConsts: map[string]igop.TypedConst{},
3841
UntypedConsts: map[string]igop.UntypedConst{},

pkg/github.com/goplus/gop/tpl/export.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ func init() {
2424
"github.com/goplus/gop/tpl/scanner": "scanner",
2525
"github.com/goplus/gop/tpl/token": "token",
2626
"github.com/goplus/gop/tpl/types": "types",
27+
"github.com/qiniu/x/errors": "errors",
2728
"io": "io",
2829
"os": "os",
30+
"reflect": "reflect",
2931
},
3032
Interfaces: map[string]reflect.Type{
3133
"Scanner": reflect.TypeOf((*q.Scanner)(nil)).Elem(),
@@ -36,6 +38,7 @@ func init() {
3638
"MatchState": reflect.TypeOf((*q.MatchState)(nil)).Elem(),
3739
},
3840
AliasTypes: map[string]reflect.Type{
41+
"Error": reflect.TypeOf((*q.Error)(nil)).Elem(),
3942
"Token": reflect.TypeOf((*q.Token)(nil)).Elem(),
4043
},
4144
Vars: map[string]reflect.Value{},
@@ -53,8 +56,11 @@ func init() {
5356
"Ident": reflect.ValueOf(q.Ident),
5457
"List": reflect.ValueOf(q.List),
5558
"New": reflect.ValueOf(q.New),
59+
"NewEx": reflect.ValueOf(q.NewEx),
5660
"Panic": reflect.ValueOf(q.Panic),
5761
"RangeOp": reflect.ValueOf(q.RangeOp),
62+
"Relocate": reflect.ValueOf(q.Relocate),
63+
"ShowConflict": reflect.ValueOf(q.ShowConflict),
5864
"UnaryExpr": reflect.ValueOf(q.UnaryExpr),
5965
},
6066
TypedConsts: map[string]igop.TypedConst{},

pkg/github.com/goplus/gop/tpl/matcher/export.go

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package matcher
55
import (
66
q "github.com/goplus/gop/tpl/matcher"
77

8+
"go/constant"
89
"reflect"
910

1011
"github.com/goplus/igop"
@@ -19,14 +20,18 @@ func init() {
1920
"fmt": "fmt",
2021
"github.com/goplus/gop/tpl/token": "token",
2122
"github.com/goplus/gop/tpl/types": "types",
23+
"log": "log",
2224
},
2325
Interfaces: map[string]reflect.Type{
2426
"Matcher": reflect.TypeOf((*q.Matcher)(nil)).Elem(),
2527
},
2628
NamedTypes: map[string]reflect.Type{
27-
"Context": reflect.TypeOf((*q.Context)(nil)).Elem(),
28-
"Error": reflect.TypeOf((*q.Error)(nil)).Elem(),
29-
"Var": reflect.TypeOf((*q.Var)(nil)).Elem(),
29+
"Choices": reflect.TypeOf((*q.Choices)(nil)).Elem(),
30+
"Context": reflect.TypeOf((*q.Context)(nil)).Elem(),
31+
"Error": reflect.TypeOf((*q.Error)(nil)).Elem(),
32+
"MatchToken": reflect.TypeOf((*q.MatchToken)(nil)).Elem(),
33+
"RecursiveError": reflect.TypeOf((*q.RecursiveError)(nil)).Elem(),
34+
"Var": reflect.TypeOf((*q.Var)(nil)).Elem(),
3035
},
3136
AliasTypes: map[string]reflect.Type{
3237
"ListRetProc": reflect.TypeOf((*q.ListRetProc)(nil)).Elem(),
@@ -36,6 +41,7 @@ func init() {
3641
"ErrVarAssigned": reflect.ValueOf(&q.ErrVarAssigned),
3742
},
3843
Funcs: map[string]reflect.Value{
44+
"Adjoin": reflect.ValueOf(q.Adjoin),
3945
"Choice": reflect.ValueOf(q.Choice),
4046
"List": reflect.ValueOf(q.List),
4147
"Literal": reflect.ValueOf(q.Literal),
@@ -45,9 +51,16 @@ func init() {
4551
"Repeat01": reflect.ValueOf(q.Repeat01),
4652
"Repeat1": reflect.ValueOf(q.Repeat1),
4753
"Sequence": reflect.ValueOf(q.Sequence),
54+
"SetDebug": reflect.ValueOf(q.SetDebug),
55+
"String": reflect.ValueOf(q.String),
4856
"Token": reflect.ValueOf(q.Token),
57+
"True": reflect.ValueOf(q.True),
58+
"WhiteSpace": reflect.ValueOf(q.WhiteSpace),
59+
},
60+
TypedConsts: map[string]igop.TypedConst{
61+
"DbgFlagAll": {reflect.TypeOf(q.DbgFlagAll), constant.MakeInt64(int64(q.DbgFlagAll))},
62+
"DbgFlagMatchVar": {reflect.TypeOf(q.DbgFlagMatchVar), constant.MakeInt64(int64(q.DbgFlagMatchVar))},
4963
},
50-
TypedConsts: map[string]igop.TypedConst{},
5164
UntypedConsts: map[string]igop.UntypedConst{},
5265
})
5366
}

pkg/github.com/goplus/gop/tpl/parser/parsertest/export.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func init() {
3030
AliasTypes: map[string]reflect.Type{},
3131
Vars: map[string]reflect.Value{},
3232
Funcs: map[string]reflect.Value{
33+
"Diff": reflect.ValueOf(q.Diff),
3334
"Expect": reflect.ValueOf(q.Expect),
3435
"Fprint": reflect.ValueOf(q.Fprint),
3536
"FprintNode": reflect.ValueOf(q.FprintNode),

pkg/github.com/goplus/gop/tpl/token/export.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ func init() {
6363
"NE": {reflect.TypeOf(q.NE), constant.MakeInt64(int64(q.NE))},
6464
"NoPos": {reflect.TypeOf(q.NoPos), constant.MakeInt64(int64(q.NoPos))},
6565
"OR_ASSIGN": {reflect.TypeOf(q.OR_ASSIGN), constant.MakeInt64(int64(q.OR_ASSIGN))},
66+
"POW": {reflect.TypeOf(q.POW), constant.MakeInt64(int64(q.POW))},
6667
"QUO_ASSIGN": {reflect.TypeOf(q.QUO_ASSIGN), constant.MakeInt64(int64(q.QUO_ASSIGN))},
68+
"RAT": {reflect.TypeOf(q.RAT), constant.MakeInt64(int64(q.RAT))},
6769
"REM_ASSIGN": {reflect.TypeOf(q.REM_ASSIGN), constant.MakeInt64(int64(q.REM_ASSIGN))},
6870
"SHL": {reflect.TypeOf(q.SHL), constant.MakeInt64(int64(q.SHL))},
6971
"SHL_ASSIGN": {reflect.TypeOf(q.SHL_ASSIGN), constant.MakeInt64(int64(q.SHL_ASSIGN))},
@@ -72,6 +74,7 @@ func init() {
7274
"SRARROW": {reflect.TypeOf(q.SRARROW), constant.MakeInt64(int64(q.SRARROW))},
7375
"STRING": {reflect.TypeOf(q.STRING), constant.MakeInt64(int64(q.STRING))},
7476
"SUB_ASSIGN": {reflect.TypeOf(q.SUB_ASSIGN), constant.MakeInt64(int64(q.SUB_ASSIGN))},
77+
"UNIT": {reflect.TypeOf(q.UNIT), constant.MakeInt64(int64(q.UNIT))},
7578
"XOR_ASSIGN": {reflect.TypeOf(q.XOR_ASSIGN), constant.MakeInt64(int64(q.XOR_ASSIGN))},
7679
},
7780
UntypedConsts: map[string]igop.UntypedConst{

pkg/github.com/goplus/gop/tpl/variant/delay/export.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func init() {
2626
Vars: map[string]reflect.Value{},
2727
Funcs: map[string]reflect.Value{
2828
"Call": reflect.ValueOf(q.Call),
29+
"CallObject": reflect.ValueOf(q.CallObject),
2930
"ChgValue": reflect.ValueOf(q.ChgValue),
3031
"Compare": reflect.ValueOf(q.Compare),
3132
"Eval": reflect.ValueOf(q.Eval),

pkg/github.com/goplus/gop/tpl/variant/export.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ func init() {
2828
Vars: map[string]reflect.Value{},
2929
Funcs: map[string]reflect.Value{
3030
"Call": reflect.ValueOf(q.Call),
31+
"CallObject": reflect.ValueOf(q.CallObject),
3132
"Compare": reflect.ValueOf(q.Compare),
3233
"Eval": reflect.ValueOf(q.Eval),
3334
"Float": reflect.ValueOf(q.Float),

0 commit comments

Comments
 (0)