1
1
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:
Rob Rix 2019-09-26 12:19:02 -04:00
parent 1a05c46bf0
commit aafe9f47bc
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

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