diff options
| author | Joel Martin <github@martintribe.org> | 2015-03-03 22:46:09 -0600 |
|---|---|---|
| committer | Joel Martin <github@martintribe.org> | 2015-03-03 22:46:09 -0600 |
| commit | 2b0fa48326927683fa19f399b3edb8aae3dbcd36 (patch) | |
| tree | 4f0d2b3b6b9e397f968f977cc38ec9a5b8b200f1 /nim/step0_repl.nim | |
| parent | 58ba5af4704c4539ee7d3814dfeff8672577f86a (diff) | |
| parent | a2cd0a3adae2ccf2566122bcd90230d905ab59dc (diff) | |
| download | mal-2b0fa48326927683fa19f399b3edb8aae3dbcd36.tar.gz mal-2b0fa48326927683fa19f399b3edb8aae3dbcd36.zip | |
Merge pull request #20 from def-/master
Add Nim
Diffstat (limited to 'nim/step0_repl.nim')
| -rw-r--r-- | nim/step0_repl.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/nim/step0_repl.nim b/nim/step0_repl.nim new file mode 100644 index 0000000..6ae7d89 --- /dev/null +++ b/nim/step0_repl.nim @@ -0,0 +1,11 @@ +import rdstdin + +proc read(str: string): string = str + +proc eval(ast: string): string = ast + +proc print(exp: string): string = exp + +while true: + let line = readLineFromStdin("user> ") + echo line.read.eval.print |
