tools/pas2c.hs
changeset 6453 11c578d30bd3
parent 6450 14224c9b4594
child 6455 d2b13364eddd
equal deleted inserted replaced
6452:7c6f9b6672dc 6453:11c578d30bd3
    28         unless processed $ do
    28         unless processed $ do
    29             fc' <- liftIO 
    29             fc' <- liftIO 
    30                 $ tryJust (guard . isDoesNotExistError) 
    30                 $ tryJust (guard . isDoesNotExistError) 
    31                 $ hPutStr stderr ("Preprocessing '" ++ fileName ++ ".pas'... ") >> preprocess (fileName ++ ".pas")
    31                 $ hPutStr stderr ("Preprocessing '" ++ fileName ++ ".pas'... ") >> preprocess (fileName ++ ".pas")
    32             case fc' of
    32             case fc' of
    33                 (Left a) -> printLn "doesn't exist"
    33                 (Left a) -> do
       
    34                     modify (Map.insert fileName System)
       
    35                     printLn "doesn't exist"
    34                 (Right fc) -> do
    36                 (Right fc) -> do
    35                     printLn "ok"
    37                     printLn "ok"
    36                     let ptree = parse pascalUnit fileName fc
    38                     let ptree = parse pascalUnit fileName fc
    37                     case ptree of
    39                     case ptree of
    38                          (Left a) -> do
    40                          (Left a) -> do