From 948473e7899cfdfb30b62b608a04d94041d2c727 Mon Sep 17 00:00:00 2001 From: elioat Date: Fri, 3 Mar 2023 10:51:14 -0500 Subject: * --- lisp/js/l.html | 4 ++-- lisp/js/lisp.js | 5 +++++ lisp/js/repl.js | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'lisp/js') diff --git a/lisp/js/l.html b/lisp/js/l.html index 2ab4e13..2699c4e 100644 --- a/lisp/js/l.html +++ b/lisp/js/l.html @@ -8,10 +8,10 @@ \ No newline at end of file diff --git a/lisp/js/lisp.js b/lisp/js/lisp.js index 1bb3e0b..06e18e5 100644 --- a/lisp/js/lisp.js +++ b/lisp/js/lisp.js @@ -414,8 +414,13 @@ return parenthesize(tokenize(input)); }; + let run = function (input) { + return interpret(parse(input)) + }; + exports.lisp = { parse: parse, interpret: interpret, + run: run, }; })(typeof exports === "undefined" ? this : exports); diff --git a/lisp/js/repl.js b/lisp/js/repl.js index 08bbfd5..61f67c3 100644 --- a/lisp/js/repl.js +++ b/lisp/js/repl.js @@ -4,7 +4,7 @@ var lisp = require("./lisp").lisp; repl.start({ prompt: "* ", eval: function (cmd, context, filename, callback) { - var ret = lisp.interpret(lisp.parse(cmd)); + var ret = lisp.run(cmd); callback(null, ret); }, }); -- cgit 1.4.1-2-gfad0