tools/PascalUnitSyntaxTree.hs
changeset 6649 7f78e8a6db69
parent 6635 c2fa29fe2a58
child 6653 d45b6dbd2ad6
--- a/tools/PascalUnitSyntaxTree.hs	Tue Feb 07 18:56:49 2012 +0100
+++ b/tools/PascalUnitSyntaxTree.hs	Tue Feb 07 22:18:44 2012 +0400
@@ -100,6 +100,7 @@
     | BTString
     | BTInt
     | BTBool
+    | BTFloat
     | BTRecord [(String, BaseType)]
     | BTArray BaseType BaseType
     | BTFunction
@@ -108,21 +109,3 @@
     | BTEnum [String]
     | BTVoid
     deriving Show
-    
-
-{--
-type2BaseType :: TypeDecl -> BaseType
-type2BaseType st@(SimpleType (Identifier s _)) = f (map toLower s)
-    where
-    f "longint" = BTInt
-    f "integer" = BTInt
-    f "word" = BTInt
-    f "pointer" = BTPointerTo BTVoid
-    f _ = error $ show st
-type2BaseType (Sequence ids) = BTEnum $ map (\(Identifier i _) -> i) ids
-type2BaseType (RecordType tv mtvs) = BTRecord $ concatMap f (concat $ tv : fromMaybe [] mtvs)
-    where
-    f (VarDeclaration _ (ids, td) _) = map (\(Identifier i _) -> (i, type2BaseType td)) ids
-type2BaseType (PointerTo t) = BTPointerTo $ type2BaseType t
-type2BaseType a = error $ show a
---}