mirror of
https://github.com/github/semantic.git
synced 2025-01-02 12:23:08 +03:00
Reformat an if statement.
This commit is contained in:
parent
1a05c46bf0
commit
aafe9f47bc
@ -43,13 +43,12 @@ runParserToAST parser blobSource = unsafeUseAsCStringLen (Source.bytes blobSourc
|
||||
| t == nullPtr = pure ()
|
||||
| otherwise = TS.ts_tree_delete t
|
||||
|
||||
go treePtr =
|
||||
if treePtr == nullPtr
|
||||
then pure Failed
|
||||
else do
|
||||
TS.ts_tree_root_node_p treePtr rootPtr
|
||||
ptr <- peek rootPtr
|
||||
Succeeded <$> anaM toAST ptr
|
||||
go treePtr = if treePtr == nullPtr then
|
||||
pure Failed
|
||||
else do
|
||||
TS.ts_tree_root_node_p treePtr rootPtr
|
||||
ptr <- peek rootPtr
|
||||
Succeeded <$> anaM toAST ptr
|
||||
in Exc.bracket acquire release go)
|
||||
|
||||
-- | Parse 'Source' with the given 'TS.Language' and return its AST.
|
||||
|
Loading…
Reference in New Issue
Block a user