summaryrefslogtreecommitdiffstats
path: root/main.sml
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2023-02-11 09:40:25 -0800
committerRose Hogenson <rhogenson@posteo.net>2023-02-11 09:40:25 -0800
commitddb69212f03a82e980144594d809a072b50e7f19 (patch)
treefeffd8402d40c8ee0c3bb441355db956ef4cc6f9 /main.sml
parentb3f2fd686bc781996687deaadbe721b3300e4aba (diff)
downloadsml-ddb69212f03a82e980144594d809a072b50e7f19.tar.zst
Finish the compiler.
Just joking. But we did manage to compile a program from SML to bytecode.
Diffstat (limited to 'main.sml')
-rw-r--r--main.sml23
1 files changed, 15 insertions, 8 deletions
diff --git a/main.sml b/main.sml
index c020691..10e6937 100644
--- a/main.sml
+++ b/main.sml
@@ -1,9 +1,16 @@
-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
+use "result.sml";
+use "buffer.sml";
+use "gensym.sml";
+use "map.sml";
+use "syntax.sml";
+use "codegen.sml";
+use "cps.sml";
+use "elab.sml";
+use "gensym.sml";
+use "linker.sml";
+use "opts.sml";
+use "parser.sml";
+use "compiler.sml";
-val _ = parseFiles (CommandLine.arguments ())
+val _ = Compiler.main ()
+val _ = OS.Process.exit OS.Process.success