use lowlevel_n helper

This commit is contained in:
Dan Knutson 2021-10-25 19:10:52 -05:00
parent 1de0e5d99b
commit 7ed37bf544

View file

@ -1239,21 +1239,7 @@ fn str_split(symbol: Symbol, var_store: &mut VarStore) -> Def {
/// Str.trim : Str -> Str
fn str_trim(symbol: Symbol, var_store: &mut VarStore) -> Def {
let str_var = var_store.fresh();
let body = RunLowLevel {
op: LowLevel::StrTrim,
args: vec![(str_var, Var(Symbol::ARG_1))],
ret_var: str_var,
};
defn(
symbol,
vec![(str_var, Symbol::ARG_1)],
var_store,
body,
str_var,
)
lowlevel_1(symbol, LowLevel::StrTrim, var_store)
}
/// Str.repeat : Str, Nat -> Str