mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
debug utility
This commit is contained in:
parent
53a7f19d90
commit
5c3a65338a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user