~habibalamin/rumland

528b6089d2f6e4d4dded7384fa0caf036963e7dc — حبيب الامين 6 months ago c233a90
Read from stdin if no filename provided
1 files changed, 2 insertions(+), 2 deletions(-)

M main.m
M main.m => main.m +2 -2
@@ 2,8 2,8 @@
%include <parsing/primitives>
%include <parsing/language>

main = [ print_error_with_usage "filename not provided"
       ], if count $* == 1
main = [ Stdout (show (runParser rumlandP $-) ++ "\n")
       ], if count $* == 1 || stdin; $0 is binary
     = [ Stdout (show (runParser rumlandP (read (last $*))) ++ "\n")
       ], if count $* == 2 || filename
     = [ print_error_with_usage "too many arguments"