Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
katat committed Apr 12, 2024
1 parent 6c56cc0 commit ded71f1
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/stdlib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,6 @@ pub fn get_std_fn(submodule: &str, fn_name: &str, span: Span) -> Result<FnInfo>
}
}

/// 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<String, FnInfo> {
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,
Expand Down

0 comments on commit ded71f1

Please sign in to comment.