Merge branch 'trunk' into refactor-builtin-list-drop

This commit is contained in:
satotake 2021-11-15 11:37:32 +00:00 committed by GitHub
commit c253273490
52 changed files with 1771 additions and 910 deletions

View file

@ -69,6 +69,7 @@ pub fn builtin_defs_map(symbol: Symbol, var_store: &mut VarStore) -> Option<Def>
STR_REPEAT => str_repeat,
STR_TRIM => str_trim,
STR_TRIM_LEFT => str_trim_left,
STR_TRIM_RIGHT => str_trim_right,
LIST_LEN => list_len,
LIST_GET => list_get,
LIST_SET => list_set,
@ -1295,6 +1296,11 @@ fn str_trim_left(symbol: Symbol, var_store: &mut VarStore) -> Def {
lowlevel_1(symbol, LowLevel::StrTrimLeft, var_store)
}
/// Str.trimRight : Str -> Str
fn str_trim_right(symbol: Symbol, var_store: &mut VarStore) -> Def {
lowlevel_1(symbol, LowLevel::StrTrimRight, var_store)
}
/// Str.repeat : Str, Nat -> Str
fn str_repeat(symbol: Symbol, var_store: &mut VarStore) -> Def {
let str_var = var_store.fresh();