File tree 2 files changed +2
-12
lines changed
2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ type Node interface {
17
17
SetLocation (file.Location )
18
18
Nature () nature.Nature
19
19
SetNature (nature.Nature )
20
- Kind () reflect.Kind
21
20
Type () reflect.Type
22
21
SetType (reflect.Type )
23
22
String () string
@@ -57,15 +56,6 @@ func (n *base) SetNature(nature nature.Nature) {
57
56
n .nature = nature
58
57
}
59
58
60
- // Kind returns the kind of the node.
61
- // If the type is nil (meaning unknown) then it returns reflect.Interface.
62
- func (n * base ) Kind () reflect.Kind {
63
- if n .nature .Type == nil {
64
- return reflect .Interface
65
- }
66
- return n .nature .Type .Kind ()
67
- }
68
-
69
59
// Type returns the type of the node.
70
60
func (n * base ) Type () reflect.Type {
71
61
if n .nature .Type == nil {
Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ func (c *compiler) IntegerNode(node *ast.IntegerNode) {
377
377
}
378
378
379
379
func (c * compiler ) FloatNode (node * ast.FloatNode ) {
380
- switch node .Kind () {
380
+ switch node .Type (). Kind () {
381
381
case reflect .Float32 :
382
382
c .emitPush (float32 (node .Value ))
383
383
case reflect .Float64 :
@@ -1199,7 +1199,7 @@ func (c *compiler) PairNode(node *ast.PairNode) {
1199
1199
}
1200
1200
1201
1201
func (c * compiler ) derefInNeeded (node ast.Node ) {
1202
- switch node .Kind () {
1202
+ switch node .Type (). Kind () {
1203
1203
case reflect .Ptr , reflect .Interface :
1204
1204
c .emit (OpDeref )
1205
1205
}
You can’t perform that action at this time.
0 commit comments