1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

Undo whitespace changes

This commit is contained in:
Rick Winfrey 2017-06-05 13:41:22 -07:00
parent 8ad6dcb958
commit 83d3e3f77d

View File

@ -30,7 +30,6 @@ import qualified Text.Parser.TreeSitter as TS
import SourceSpan
import Info
-- | Returns a TreeSitter parser for the given language and TreeSitter grammar.
treeSitterParser :: Language -> Ptr TS.Language -> Source -> IO (Term (Syntax.Syntax Text) (Record DefaultFields))
treeSitterParser language grammar source = bracket ts_document_new ts_document_free $ \ document -> do
@ -41,6 +40,7 @@ treeSitterParser language grammar source = bracket ts_document_new ts_document_f
term <- documentToTerm language document source
pure term
-- | Parse 'Source' with the given 'TS.Language' and return its AST.
parseToAST :: (Bounded grammar, Enum grammar) => Ptr TS.Language -> Source -> IO (A.AST grammar)
parseToAST language source = bracket ts_document_new ts_document_free $ \ document -> do