diff --git a/src/Semantic/Util/Rewriting.hs b/src/Semantic/Util/Rewriting.hs index 4153fec4a..20eb1907f 100644 --- a/src/Semantic/Util/Rewriting.hs +++ b/src/Semantic/Util/Rewriting.hs @@ -26,6 +26,15 @@ import Reprinting.Pipeline import Semantic.IO as IO import Semantic.Task +debugTree act = do + (src, tree') <- act + let tree = mark Unmodified tree' + putStrLn "*** Original file ***" + pPrint tree + putStrLn "\n\n*** Tokenizing ***" + pPrint (runTokenizing src tree) + putStrLn "\n\n*** Done ***" + testPythonFile = do let path = "test/fixtures/python/reprinting/function.py" src <- blobSource <$> readBlobFromPath (File path Language.Python)