Fixed piping in file.

This commit is contained in:
Bruce Hill 2018-06-05 16:44:36 -07:00
parent 42632e01b2
commit 2d88c68d71
2 changed files with 6 additions and 2 deletions

View File

@ -1707,7 +1707,9 @@ OPTIONS
end end
end end
elseif input == STDIN then 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 else
nomsu:run_file(input, compile_fn) nomsu:run_file(input, compile_fn)
end end

View File

@ -1185,7 +1185,9 @@ OPTIONS
print_file\write(formatted, "\n") print_file\write(formatted, "\n")
print_file\flush! print_file\flush!
elseif input == STDIN 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 else
nomsu\run_file(input, compile_fn) nomsu\run_file(input, compile_fn)