diff --git a/src/Parsing/TreeSitter.hs b/src/Parsing/TreeSitter.hs index 256b91b83..15ca8a920 100644 --- a/src/Parsing/TreeSitter.hs +++ b/src/Parsing/TreeSitter.hs @@ -85,7 +85,8 @@ parseToAST parseTimeout language Blob{..} = bracket (liftIO TS.ts_parser_new) (l Just (Succeeded ast) -> Just ast <$ trace ("tree-sitter: parsing succeeded " <> blobPath) Nothing -> do trace $ "tree-sitter: parsing timed out " <> blobPath - Nothing <$ liftIO (TS.ts_parser_set_enabled parser (CBool 0)) + liftIO (TS.ts_parser_set_enabled parser (CBool 0)) + Nothing <$ liftIO (wait parsing) toAST :: forall grammar . (Bounded grammar, Enum grammar) => TS.Node -> IO (Base (AST [] grammar) TS.Node)