mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 18:20:22 +02:00
Implement variable-bound? builtin
* module/language/js-il/runtime.js(variable-bound?): Implement builtin
This commit is contained in:
parent
b84797947d
commit
c5fa12f344
1 changed files with 4 additions and 0 deletions
|
@ -1360,6 +1360,10 @@ def_guile0("make-undefined-variable", function (self, cont, val) {
|
||||||
return cont(new scheme.Box(scheme.UNDEFINED));
|
return cont(new scheme.Box(scheme.UNDEFINED));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
def_guile0("variable-bound?", function (self, cont, box) {
|
||||||
|
return cont(coerce_bool(!(box.x === scheme.UNDEFINED)));
|
||||||
|
});
|
||||||
|
|
||||||
def_guile0("define!", function (self, cont, symbol, value) {
|
def_guile0("define!", function (self, cont, symbol, value) {
|
||||||
// FIXME: validate symbol
|
// FIXME: validate symbol
|
||||||
return cont(scm_module_define(scm_current_module(), symbol, value));
|
return cont(scm_module_define(scm_current_module(), symbol, value));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue