Add global raise function
This commit is contained in:
parent
fe7bda0f40
commit
e31dc3d585
2 changed files with 10 additions and 0 deletions
|
|
@ -649,6 +649,13 @@ get_optional(apfl_ctx ctx)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
impl_raise(apfl_ctx ctx)
|
||||
{
|
||||
ONE_ARG(ctx, "raise");
|
||||
apfl_raise_error(ctx, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
symbol(apfl_ctx ctx)
|
||||
{
|
||||
|
|
@ -718,5 +725,6 @@ apfl_builtins(apfl_ctx ctx)
|
|||
add_builtin(ctx, "iterate-dict", iterate_dict);
|
||||
add_builtin(ctx, "symbol", symbol);
|
||||
add_builtin(ctx, "get-optional", get_optional);
|
||||
add_builtin(ctx, "raise", impl_raise);
|
||||
add_builtin(ctx, "getsym-Some", apfl_sym_some);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
loadfile := builtins.loadfile
|
||||
loadstring := builtins.loadstring
|
||||
get-optional := builtins.get-optional
|
||||
raise := builtins.raise
|
||||
symbol := builtins.symbol
|
||||
-serialize-bytecode := builtins.-serialize-bytecode
|
||||
-unserialize-bytecode := builtins.-unserialize-bytecode
|
||||
|
|
@ -241,6 +242,7 @@
|
|||
'keach -> keach
|
||||
'each -> each
|
||||
'get-optional -> get-optional
|
||||
'raise -> raise
|
||||
'has-key -> has-key
|
||||
'symbol -> symbol
|
||||
'Some -> Some
|
||||
|
|
|
|||
Loading…
Reference in a new issue