diff options
Diffstat (limited to 'Generate.hs')
-rw-r--r-- | Generate.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Generate.hs b/Generate.hs index a35cb66..4eea1dc 100644 --- a/Generate.hs +++ b/Generate.hs | |||
@@ -22,6 +22,8 @@ instance Unquote Type | |||
22 | 22 | ||
23 | main :: IO () | 23 | main :: IO () |
24 | main = do | 24 | main = do |
25 | dataSwift <- eitherParseFile "templates/data.swift.ede" | ||
26 | dataJava <- eitherParseFile "templates/data.java.ede" | ||
25 | dataHpp <- eitherParseFile "templates/data.hpp.ede" | 27 | dataHpp <- eitherParseFile "templates/data.hpp.ede" |
26 | dataCpp <- eitherParseFile "templates/data.cpp.ede" | 28 | dataCpp <- eitherParseFile "templates/data.cpp.ede" |
27 | dataCs <- eitherParseFile "templates/data.cs.ede" | 29 | dataCs <- eitherParseFile "templates/data.cs.ede" |
@@ -46,6 +48,8 @@ main = do | |||
46 | , "psType" @: psType aliasMap | 48 | , "psType" @: psType aliasMap |
47 | , "cppType" @: cppType aliasMap | 49 | , "cppType" @: cppType aliasMap |
48 | , "csType" @: csType aliasMap | 50 | , "csType" @: csType aliasMap |
51 | , "javaType" @: javaType aliasMap | ||
52 | , "swiftType" @: swiftType aliasMap | ||
49 | ] | 53 | ] |
50 | 54 | ||
51 | -- Haskell | 55 | -- Haskell |
@@ -55,6 +59,12 @@ main = do | |||
55 | -- C++ | 59 | -- C++ |
56 | either error (\x -> writeFile ("out/" ++ name ++ ".hpp") $ LText.unpack x) $ dataHpp >>= (\t -> eitherRenderWith mylib t env) | 60 | either error (\x -> writeFile ("out/" ++ name ++ ".hpp") $ LText.unpack x) $ dataHpp >>= (\t -> eitherRenderWith mylib t env) |
57 | either error (\x -> writeFile ("out/" ++ name ++ ".cpp") $ LText.unpack x) $ dataCpp >>= (\t -> eitherRenderWith mylib t env) | 61 | either error (\x -> writeFile ("out/" ++ name ++ ".cpp") $ LText.unpack x) $ dataCpp >>= (\t -> eitherRenderWith mylib t env) |
62 | {- | ||
63 | -- Java | ||
64 | either error (\x -> writeFile ("out/" ++ name ++ ".java") $ LText.unpack x) $ dataJava >>= (\t -> eitherRenderWith mylib t env) | ||
58 | -- C# | 65 | -- C# |
59 | either error (\x -> writeFile ("out/" ++ name ++ ".cs") $ LText.unpack x) $ dataCs >>= (\t -> eitherRenderWith mylib t env) | 66 | either error (\x -> writeFile ("out/" ++ name ++ ".cs") $ LText.unpack x) $ dataCs >>= (\t -> eitherRenderWith mylib t env) |
67 | -} | ||
68 | -- Swift | ||
69 | either error (\x -> writeFile ("out/" ++ name ++ ".swift") $ LText.unpack x) $ dataSwift >>= (\t -> eitherRenderWith mylib t env) | ||
60 | mapM_ generate $ execWriter modules | 70 | mapM_ generate $ execWriter modules |