From ded71f1e10b24eeb93733537a3af3de733566314 Mon Sep 17 00:00:00 2001 From: kata Date: Fri, 12 Apr 2024 09:38:26 +0800 Subject: [PATCH] remove dead code --- src/stdlib/mod.rs | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/stdlib/mod.rs b/src/stdlib/mod.rs index e36476f62..938bdbdd1 100644 --- a/src/stdlib/mod.rs +++ b/src/stdlib/mod.rs @@ -39,30 +39,6 @@ pub fn get_std_fn(submodule: &str, fn_name: &str, span: Span) -> Result } } -/// Takes a list of function signatures (as strings) and their associated function pointer, -/// returns the same list but with the parsed functions (as [FunctionSig]). -pub fn parse_fn_sigs(fn_sigs: &[(&str, FnHandle)]) -> HashMap { - let mut functions = HashMap::new(); - let ctx = &mut ParserCtx::default(); - - for (sig, fn_ptr) in fn_sigs { - // filename_id 0 is for builtins - let mut tokens = Token::parse(0, sig).unwrap(); - - let sig = FnSig::parse(ctx, &mut tokens).unwrap(); - - functions.insert( - sig.name.value.clone(), - FnInfo { - kind: FnKind::BuiltIn(sig, *fn_ptr), - span: Span::default(), - }, - ); - } - - functions -} - // // Builtins or utils (imported by default) // TODO: give a name that's useful for the user,