Add Str.toScalars builtin

This commit is contained in:
Richard Feldman 2022-07-01 22:34:17 -04:00
parent b1fe76adbf
commit acb7cf99e1
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798
11 changed files with 73 additions and 3 deletions

View file

@ -23,6 +23,7 @@ pub enum LowLevel {
StrTrimLeft,
StrTrimRight,
StrToNum,
StrToScalars,
ListLen,
ListWithCapacity,
ListGetUnsafe,
@ -193,6 +194,7 @@ impl LowLevelWrapperType {
match symbol {
Symbol::STR_CONCAT => CanBeReplacedBy(StrConcat),
Symbol::STR_TO_SCALARS => CanBeReplacedBy(StrToScalars),
Symbol::STR_JOIN_WITH => CanBeReplacedBy(StrJoinWith),
Symbol::STR_IS_EMPTY => CanBeReplacedBy(StrIsEmpty),
Symbol::STR_STARTS_WITH => CanBeReplacedBy(StrStartsWith),

View file

@ -1189,6 +1189,7 @@ define_builtins! {
31 STR_TO_I16: "toI16"
32 STR_TO_U8: "toU8"
33 STR_TO_I8: "toI8"
34 STR_TO_SCALARS: "toScalars"
}
5 LIST: "List" => {
0 LIST_LIST: "List" imported // the List.List type alias