From b0072e6dcf3525365977cd4ba9f4f19c745fa16e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 31 Oct 2017 18:35:40 -0700 Subject: Added local var persistence for REPL. --- nomsu.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nomsu.lua') diff --git a/nomsu.lua b/nomsu.lua index 055c8a2..da0c699 100644 --- a/nomsu.lua +++ b/nomsu.lua @@ -1188,6 +1188,7 @@ if arg then end end if args.flags["-i"] then + local vars = { } c:run('require "lib/core.nom"', "stdin") while true do local buff = "" @@ -1203,7 +1204,7 @@ if arg then break end local ok, ret = pcall(function() - return c:run(buff, "stdin") + return c:run(buff, "stdin", vars) end) if ok and ret ~= nil then print("= " .. repr(ret)) -- cgit v1.2.3