compiler: support System.Binary.Atoi/Itoa
syscalls
This commit is contained in:
parent
e4bf531e3e
commit
d193e16662
2 changed files with 14 additions and 0 deletions
|
@ -5,11 +5,13 @@ import "github.com/nspcc-dev/neo-go/pkg/core/interop/interopnames"
|
|||
// All lists are sorted, keep 'em this way, please.
|
||||
var syscalls = map[string]map[string]string{
|
||||
"binary": {
|
||||
"Atoi": interopnames.SystemBinaryAtoi,
|
||||
"Base58Decode": interopnames.SystemBinaryBase58Decode,
|
||||
"Base58Encode": interopnames.SystemBinaryBase58Encode,
|
||||
"Base64Decode": interopnames.SystemBinaryBase64Decode,
|
||||
"Base64Encode": interopnames.SystemBinaryBase64Encode,
|
||||
"Deserialize": interopnames.SystemBinaryDeserialize,
|
||||
"Itoa": interopnames.SystemBinaryItoa,
|
||||
"Serialize": interopnames.SystemBinarySerialize,
|
||||
},
|
||||
"blockchain": {
|
||||
|
|
|
@ -40,3 +40,15 @@ func Base58Encode(b []byte) string {
|
|||
func Base58Decode(b []byte) []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Itoa converts num in a given base to string. Base should be either 10 or 16.
|
||||
// It uses `System.Binary.Itoa` syscall.
|
||||
func Itoa(num int, base int) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// Atoi converts string to a number in a given base. Base should be either 10 or 16.
|
||||
// It uses `System.Binary.Atoi` syscall.
|
||||
func Atoi(s string, base int) int {
|
||||
return 0
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue