From cab564e400590cbd8a88e190fe381a74655005cf Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 5 Mar 2022 18:14:28 +0100 Subject: Multiple file support for generating assembly --- src/Fun/Generator.hs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/Fun/Generator.hs (limited to 'src/Fun/Generator.hs') diff --git a/src/Fun/Generator.hs b/src/Fun/Generator.hs new file mode 100644 index 0000000..17f47e3 --- /dev/null +++ b/src/Fun/Generator.hs @@ -0,0 +1,13 @@ +module Fun.Generator where + +import Fun.Tree +import Fun.Typer + +-- TODO: 'Merge' syntax for danger-asm: _merge (_asm ..) main (_asm ..) + +data GenerateError = GenerateError String + +generateAsm :: Tree -> Either GenerateError String +-- generateAsm (Tree t) = Right $ show t +generateAsm t = + Left $ GenerateError $ show $ getFunction t "_start" [InternalType "_void"] -- cgit v1.2.3