tools/pas2c/PascalParser.hs
changeset 14235 3a9e4f35aa68
parent 11398 c3a535886806
child 15958 24545642473f
equal deleted inserted replaced
14234:27ae2d3d04b6 14235: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