From 3e0b36dcee99ddfd7ea0e04a382c1ad3858fc45f Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Sat, 28 Feb 2015 15:58:35 -0600 Subject: Lua: fix with new runtest.py --- lua/step8_macros.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lua/step8_macros.lua') diff --git a/lua/step8_macros.lua b/lua/step8_macros.lua index 46a5881..25a9238 100755 --- a/lua/step8_macros.lua +++ b/lua/step8_macros.lua @@ -156,6 +156,11 @@ rep("(def! load-file (fn* (f) (eval (read-string (str \"(do \" (slurp f) \")\")) rep("(defmacro! cond (fn* (& xs) (if (> (count xs) 0) (list 'if (first xs) (if (> (count xs) 1) (nth xs 1) (throw \"odd number of forms to cond\")) (cons 'cond (rest (rest xs)))))))") rep("(defmacro! or (fn* (& xs) (if (empty? xs) nil (if (= 1 (count xs)) (first xs) `(let* (or_FIXME ~(first xs)) (if or_FIXME or_FIXME (or ~@(rest xs))))))))") +if #arg > 0 and arg[1] == "--raw" then + readline.raw = true + table.remove(arg,1) +end + if #arg > 0 then rep("(load-file \""..arg[1].."\")") os.exit(0) -- cgit v1.2.3