1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

++haskell-tree-sitter to use halt_on_error

This commit is contained in:
Timothy Clem 2017-05-03 13:22:46 -07:00
parent 9b3329b41a
commit c9f69c32b5
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ treeSitterParser language grammar blob = do
ts_document_set_language document grammar ts_document_set_language document grammar
withCStringLen (toText (source blob)) $ \ (source, len) -> do withCStringLen (toText (source blob)) $ \ (source, len) -> do
ts_document_set_input_string_with_length document source len ts_document_set_input_string_with_length document source len
ts_document_parse document ts_document_parse_halt_on_error document
term <- documentToTerm language document blob term <- documentToTerm language document blob
ts_document_free document ts_document_free document
pure term pure term
@ -55,7 +55,7 @@ parseRubyToAST source = do
ts_document_set_language document Ruby.tree_sitter_ruby ts_document_set_language document Ruby.tree_sitter_ruby
root <- withCStringLen (toText source) $ \ (source, len) -> do root <- withCStringLen (toText source) $ \ (source, len) -> do
ts_document_set_input_string_with_length document source len ts_document_set_input_string_with_length document source len
ts_document_parse document ts_document_parse_halt_on_error document
alloca (\ rootPtr -> do alloca (\ rootPtr -> do
ts_document_root_node_p document rootPtr ts_document_root_node_p document rootPtr
peek rootPtr) peek rootPtr)

@ -1 +1 @@
Subproject commit dd1b9f9b827871085dfa58108f570b59890bcaf7 Subproject commit 11361887f9d17170293413bf2717b724dc48fac8