diff options
author | Marvin Borner | 2022-03-05 18:14:28 +0100 |
---|---|---|
committer | Marvin Borner | 2022-03-05 18:14:28 +0100 |
commit | cab564e400590cbd8a88e190fe381a74655005cf (patch) | |
tree | ded57f2ddc8d127d1e82ae999862ce169ef900ba /src/Fun/Generator.hs | |
parent | c7d578ec4d9b87c36f504e5a0691007439d2a025 (diff) |
Multiple file support for generating assembly
Diffstat (limited to 'src/Fun/Generator.hs')
-rw-r--r-- | src/Fun/Generator.hs | 13 |
1 files changed, 13 insertions, 0 deletions
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"] |