HCoop
/
jackhill
/
mal.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Merge pull request #519 from dubek/fix-ruby-keyword
[jackhill/mal.git]
/
impls
/
julia
/
step0_repl.jl
1
#!/usr/bin/env julia
2
3
push!(LOAD_PATH, pwd(), "/usr/share/julia/base")
4
import readline_mod
5
6
# READ
7
function READ(str)
8
str
9
end
10
11
# EVAL
12
function EVAL(ast, env)
13
ast
14
end
15
16
# PRINT
17
function PRINT(exp)
18
exp
19
end
20
21
# REPL
22
function REP(str)
23
return PRINT(EVAL(READ(str), []))
24
end
25
26
while true
27
line = readline_mod.do_readline("user> ")
28
if line === nothing break end
29
println(REP(line))
30
end