aboutsummaryrefslogtreecommitdiff
path: root/nomsu.moon
diff options
context:
space:
mode:
Diffstat (limited to 'nomsu.moon')
-rwxr-xr-xnomsu.moon14
1 files changed, 14 insertions, 0 deletions
diff --git a/nomsu.moon b/nomsu.moon
index 88ec471..2095a75 100755
--- a/nomsu.moon
+++ b/nomsu.moon
@@ -603,5 +603,19 @@ if arg and arg[1]
local c = NomsuCompiler()
load()(c, {})
]]
+elseif arg
+ -- REPL:
+ c = NomsuCompiler()
+ while true
+ buff = ""
+ while true
+ io.write(">> ")
+ line = io.read("*L")
+ if line == "\n" or not line
+ break
+ buff ..= line
+ if #buff == 0
+ break
+ c\run(buff)
return NomsuCompiler