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

@ -873,6 +873,13 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
Box::new(str_type()),
);
// Str.toScalars : Str -> List U32
add_top_level_function_type!(
Symbol::STR_TO_SCALARS,
vec![str_type()],
Box::new(list_type(u32_type())),
);
// isEmpty : Str -> Bool
add_top_level_function_type!(
Symbol::STR_IS_EMPTY,