diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2017-09-14 15:35:06 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2017-09-14 15:35:06 -0700 |
| commit | f8f5e7b6535264e7142bf94692fcb6e2ef007fbc (patch) | |
| tree | ef40c71a8249a74cec2f603b17b553db4640ec0f /nomsu.moon | |
| parent | bce6cd2e216b01d28d041f47d927ea0819c27533 (diff) | |
Added REPL.
Diffstat (limited to 'nomsu.moon')
| -rwxr-xr-x | nomsu.moon | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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 |
