diff options
| -rw-r--r-- | nomsu.lua | 4 | ||||
| -rwxr-xr-x | nomsu.moon | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -1707,7 +1707,9 @@ OPTIONS end end elseif input == STDIN then - nomsu:run(io.input():read("*a"), compile_fn) + local file = io.input():read("*a") + FILE_CACHE.stdin = file + nomsu:run(Nomsu(Source('stdin', 1, #file), file), compile_fn) else nomsu:run_file(input, compile_fn) end @@ -1185,7 +1185,9 @@ OPTIONS print_file\write(formatted, "\n") print_file\flush! elseif input == STDIN - nomsu\run(io.input!\read("*a"), compile_fn) + file = io.input!\read("*a") + FILE_CACHE.stdin = file + nomsu\run(Nomsu(Source('stdin',1,#file), file), compile_fn) else nomsu\run_file(input, compile_fn) |
