From b3f2fd686bc781996687deaadbe721b3300e4aba Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Fri, 10 Feb 2023 15:06:47 -0800 Subject: Write a first draft of the compiler. Sorry I haven't been better about these commit messages. You're not my mom. --- main.sml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 main.sml (limited to 'main.sml') diff --git a/main.sml b/main.sml new file mode 100644 index 0000000..c020691 --- /dev/null +++ b/main.sml @@ -0,0 +1,9 @@ +fun parseFiles (filenames : string list) : (string, Syntax.dec list) Either.either = + let fun go [] acc = Either.Right (concat (rev acc)) + | go (f :: fs) acc = + case Parser.parse f + Either.Right prog => go fs (prog :: acc) + err => err + in go [] filenames + +val _ = parseFiles (CommandLine.arguments ()) -- cgit v1.3.1