- if (typeof x == 'string')
- return make_lisp_string(x);
- else if (typeof x == 'function'){
- // Trampoline calling the JS function
- return (function(values, nargs){
- var args = Array.prototype.slice.call(arguments, 2);
- for (var i in args)
- args[i] = lisp_to_js(args[i]);
- return values(js_to_lisp(x.apply(this, args)));
- });
- } else return x;
+ if (typeof x == 'string')
+ return make_lisp_string(x);
+ else if (x === true)
+ return t;
+ else if (x === false)
+ return nil;
+ else if (typeof x == 'function'){
+ // Trampoline calling the JS function
+ return (function(values, nargs){
+ var args = Array.prototype.slice.call(arguments, 2);
+ for (var i in args)
+ args[i] = lisp_to_js(args[i]);
+ return values(js_to_lisp(x.apply(this, args)));
+ });
+ } else return x;
+}
+
+
+// Non-local exits
+
+function BlockNLX (id, values, name){
+ this.id = id;
+ this.values = values;
+ this.name = name;
+}
+
+function CatchNLX (id, values){
+ this.id = id;
+ this.values = values;
+}
+
+function TagNLX (id, label){
+ this.id = id;
+ this.label = label;