-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
610613e
commit b3ded4e
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,25 @@ | |||
|
|||
|
|||
local quote = require "quote" | |||
local eval = require "eval_cont" | |||
local lisp = require "lisp" | |||
|
|||
|
|||
local cmd | |||
local env = eval.Environment.initEnv() | |||
|
|||
local function func_noop() end | |||
|
|||
repeat | |||
io.write("> ") | |||
cmd = io.read("l") | |||
|
|||
if cmd ~= "exit" then | |||
local bottom_cont = eval.ContinuationBottom:new(func_noop) | |||
local s_exp = quote.quote(cmd) | |||
local value = eval.eval_begin(s_exp, env, bottom_cont) | |||
print(value) | |||
end | |||
|
|||
until cmd == "exit" | |||
|