tools/pas2c/Pas2C.hs
changeset 10240 bfae7354d42f
parent 10142 adb804cb2638
child 10245 3ccc054c3c3e
equal deleted inserted replaced
10239:ed8bab6e92ba 10240:bfae7354d42f
   119                 (Right fc) -> do
   119                 (Right fc) -> do
   120                     print' "ok, parsing... "
   120                     print' "ok, parsing... "
   121                     let ptree = parse pascalUnit fileName fc
   121                     let ptree = parse pascalUnit fileName fc
   122                     case ptree of
   122                     case ptree of
   123                          (Left a) -> do
   123                          (Left a) -> do
   124                             liftIO $ writeFile (outputPath ++ "preprocess.out") fc
   124                             liftIO $ writeFile (outputPath ++ fileName ++ "preprocess.out") fc
   125                             printLn $ show a ++ "\nsee preprocess.out for preprocessed source"
   125                             printLn $ show a ++ "\nsee preprocess.out for preprocessed source"
   126                             fail "stop"
   126                             fail "stop"
   127                          (Right a) -> do
   127                          (Right a) -> do
   128                             printLn "ok"
   128                             printLn "ok"
   129                             modify (Map.insert fileName a)
   129                             modify (Map.insert fileName a)