1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00

debug utility

This commit is contained in:
Patrick Thomson 2018-10-05 11:50:54 -04:00
parent 53a7f19d90
commit 5c3a65338a

View File

@ -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)