github.com/nevalang/neva@v0.23.1-0.20240507185603-7696a9bb8dda/internal/runtime/funcs/registry.go (about) 1 // Package funcs implements low-level components (runtime functions). 2 // It has only one exported entity which is function creators registry. 3 package funcs 4 5 import ( 6 "github.com/nevalang/neva/internal/runtime" 7 ) 8 9 func CreatorRegistry() map[string]runtime.FuncCreator { 10 return map[string]runtime.FuncCreator{ 11 // core 12 "new": new{}, 13 "del": del{}, 14 "lock": lock{}, 15 "match": match{}, 16 "unwrap": unwrap{}, 17 "panic": panicker{}, 18 19 // streamers 20 "array_port_to_stream": arrayPortToStream{}, 21 "list_to_stream": listToStream{}, 22 "stream_int_range": streamIntRange{}, 23 24 // builders 25 "struct_builder": structBuilder{}, 26 "stream_to_list": streamToList{}, 27 28 // structures 29 "field": readStructField{}, 30 31 // math 32 "int_add": intAdd{}, 33 "int_sub": intSub{}, 34 "int_mul": intMul{}, 35 "int_decr": intDecr{}, 36 "int_mod": intMod{}, 37 38 // strconv 39 "parse_int": parseInt{}, 40 41 // regexp 42 "regexp_submatch": regexpSubmatch{}, 43 44 // list 45 "index": index{}, 46 "list_len": listlen{}, 47 "list_push": listPush{}, 48 "int_sort": listSortInt{}, 49 "float_sort": listSortFloat{}, 50 51 // time 52 "time_sleep": timeSleep{}, 53 54 // strings 55 "join": stringJoin{}, 56 "split": stringSplit{}, 57 "string_sort": listSortString{}, 58 59 // io 60 "scanln": scanln{}, 61 "println": println{}, 62 "printf": printf{}, 63 64 // io/file 65 "read_all": readAll{}, 66 "write_all": writeAll{}, 67 // http 68 "http_get": httpGet{}, 69 // image 70 "image_encode": imageEncode{}, 71 "image_new": imageNew{}, 72 } 73 }