tools/pas2c/PascalParser.hs
changeset 14240 3a9e4f35aa68
parent 11403 c3a535886806
equal deleted inserted replaced
14239:27ae2d3d04b6 14240:3a9e4f35aa68
   165         comments
   165         comments
   166         t <- typeDecl
   166         t <- typeDecl
   167         if null r then
   167         if null r then
   168             return $ ArrayDecl Nothing t
   168             return $ ArrayDecl Nothing t
   169             else
   169             else
   170             return $ foldr (\a b -> ArrayDecl (Just a) b) (ArrayDecl (Just $ head r) t) (tail r)
   170             return $ foldr (\a b -> ArrayDecl (Just a) b) (ArrayDecl (Just $ last r) t) (init r)
   171     recordDecl = do
   171     recordDecl = do
   172         try $ do
   172         try $ do
   173             optional $ (try $ string' "packed") >> comments
   173             optional $ (try $ string' "packed") >> comments
   174             string' "record"
   174             string' "record"
   175         comments
   175         comments