about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2024-04-03 22:48:24 -0500
committerCase Duckworth2024-04-03 22:48:24 -0500
commit48629210e56669e53106268a9e0a705b9cdb7e69 (patch)
treeb0d2c31a23b2054c59392295e9b06b816f93f074
parentRead comments and # literals (diff)
downloadlam-48629210e56669e53106268a9e0a705b9cdb7e69.tar.gz
lam-48629210e56669e53106268a9e0a705b9cdb7e69.zip
Uh logo stuff oops
-rw-r--r--repl.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/repl.lua b/repl.lua index 016df17..c2233c4 100644 --- a/repl.lua +++ b/repl.lua
@@ -11,6 +11,8 @@ local function schemeprint (x)
11 print("#t") 11 print("#t")
12 elseif x == false then 12 elseif x == false then
13 print("#f") 13 print("#f")
14 elseif x == nil then
15 print("#n")
14 else 16 else
15 print(x) 17 print(x)
16 end 18 end
@@ -29,7 +31,10 @@ function m.repl (prompt, infile, out)
29 -- filename, nil (in which case it will be stdout), or false (which 31 -- filename, nil (in which case it will be stdout), or false (which
30 -- suppresses output) 32 -- suppresses output)
31 local inport = read.inport(infile) 33 local inport = read.inport(infile)
32 if out ~= false then io.output(out) end 34 if out ~= false then
35 io.output(out)
36 io.write(lam)
37 end
33 io.output():setvbuf("line") 38 io.output():setvbuf("line")
34 if prompt then 39 if prompt then
35 stderr = io.open("/dev/stderr", "w") -- Linux-only ! 40 stderr = io.open("/dev/stderr", "w") -- Linux-only !