forked from TrueCloudLab/neoneo-go
compiler/interop: add missing methods to interop.Iterator
Add Next() and Value() to interop.Iterator and corresponding syscalls to compiler
This commit is contained in:
parent
2a262c6ef4
commit
37cb60a0b5
2 changed files with 13 additions and 0 deletions
|
@ -86,6 +86,8 @@ var syscalls = map[string]map[string]string{
|
||||||
"Create": "Neo.Iterator.Create",
|
"Create": "Neo.Iterator.Create",
|
||||||
"Key": "Neo.Iterator.Key",
|
"Key": "Neo.Iterator.Key",
|
||||||
"Keys": "Neo.Iterator.Keys",
|
"Keys": "Neo.Iterator.Keys",
|
||||||
|
"Next": "Neo.Iterator.Next",
|
||||||
|
"Value": "Neo.Iterator.Value",
|
||||||
"Values": "Neo.Iterator.Values",
|
"Values": "Neo.Iterator.Values",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,17 @@ func Keys(it Iterator) []interface{} {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Next advances the iterator, return true if it is was successful
|
||||||
|
// and false otherwise.
|
||||||
|
func Next(it Iterator) bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Value returns the current iterator value.
|
||||||
|
func Value(it Iterator) interface{} {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// Values returns the iterator values.
|
// Values returns the iterator values.
|
||||||
func Values(it Iterator) []interface{} {
|
func Values(it Iterator) []interface{} {
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue