tools/pas2c/PascalParser.hs
branchwebgl
changeset 8444 75db7bb8dce8
parent 8442 535a00ca0d35
parent 8020 00b1facf2805
child 9166 3774ac58e65e
--- a/tools/pas2c/PascalParser.hs	Wed Jan 02 11:11:49 2013 +0100
+++ b/tools/pas2c/PascalParser.hs	Sun Jan 27 00:28:57 2013 +0100
@@ -45,7 +45,7 @@
         parens pas (liftM RefExpression expression >>= postfixes) >>= postfixes
         , try $ typeCast >>= postfixes
         , char '@' >> liftM Address reference >>= postfixes
-        , liftM SimpleReference iD >>= postfixes 
+        , liftM SimpleReference iD >>= postfixes
         ] <?> "simple reference"
 
     table = [
@@ -149,7 +149,7 @@
         if null r then
             return $ ArrayDecl Nothing t
             else
-            return $ foldr (\a b -> ArrayDecl (Just a) b) (ArrayDecl (Just $ head r) t) (tail r) 
+            return $ foldr (\a b -> ArrayDecl (Just a) b) (ArrayDecl (Just $ head r) t) (tail r)
     recordDecl = do
         try $ do
             optional $ (try $ string "packed") >> comments
@@ -414,7 +414,7 @@
         {-, [  Infix (try $ string "shl" >> return (BinOp "shl")) AssocNone
              , Infix (try $ string "shr" >> return (BinOp "shr")) AssocNone
           ]
-        , [ 
+        , [
              Infix (try $ string "or" >> return (BinOp "or")) AssocLeft
            , Infix (try $ string "xor" >> return (BinOp "xor")) AssocLeft
           ]-}
@@ -510,7 +510,7 @@
             optionMaybe $ choice [
                 try $ string "to"
                 , try $ string "downto"
-                ]   
+                ]
     --choice [string "to", string "downto"]
     comments
     e2 <- expression
@@ -576,7 +576,7 @@
 initExpression = buildExpressionParser table term <?> "initialization expression"
     where
     term = comments >> choice [
-        liftM (uncurry BuiltInFunction) $ builtInFunction initExpression 
+        liftM (uncurry BuiltInFunction) $ builtInFunction initExpression
         , try $ brackets pas (commaSep pas $ initExpression) >>= return . InitSet
         , try $ parens pas (commaSep pas $ initExpression) >>= \ia -> when (null $ tail ia) mzero >> return (InitArray ia)
         , try $ parens pas (sepEndBy recField (char ';' >> comments)) >>= return . InitRecord