crypto builtins (#57)

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2023-12-06 07:59:04 -08:00
committed by GitHub
parent ab968c2386
commit 70bf371ebf
14 changed files with 342 additions and 36 deletions

View File

@@ -51,12 +51,17 @@ fn get_extra_arg_impl(
*n_args
} else {
let path = get_path_string(fcn, None)?;
if let Some((_, n_args)) = BUILTINS.get(path.as_str()) {
if let Some((_, n_args)) = functions.get(&path) {
*n_args
} else if let Some((_, n_args)) = DEPRECATED.get(path.as_str()) {
} else if let Some((_, n_args)) = BUILTINS.get(path.as_str()) {
*n_args
} else {
return Ok(None);
#[cfg(feature = "deprecated")]
if let Some((_, n_args)) = DEPRECATED.get(path.as_str()) {
*n_args
} else {
return Ok(None);
}
}
};
if (n_args as usize) + 1 == params.len() {