File tree Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change
1
+ package ops
2
+
3
+ type funcBase string
4
+
5
+ func (f * funcBase ) String () string {
6
+ return string (* f )
7
+ }
8
+
9
+ func (* funcBase ) IsMacro () bool {
10
+ return false
11
+ }
Original file line number Diff line number Diff line change @@ -8,23 +8,15 @@ import (
8
8
)
9
9
10
10
func init () {
11
- opName := doOp ("do" )
12
- DoOp = & opName
13
11
opsMap ["do" ] = DoOp
14
12
}
15
13
16
- type doOp string
17
-
18
- // DoOp is "do" operation
19
- var DoOp * doOp
20
-
21
- func (* doOp ) String () string {
22
- return string (* DoOp )
14
+ type doOp struct {
15
+ funcBase
23
16
}
24
17
25
- func (* doOp ) IsMacro () bool {
26
- return false
27
- }
18
+ // DoOp is "do" operation
19
+ var DoOp = & doOp {funcBase ("do" )}
28
20
29
21
func (* doOp ) Bind (args ... types.Value ) (types.Expr , error ) {
30
22
sig := make ([]types.Type , 0 , len (args ))
You can’t perform that action at this time.
0 commit comments