ChimeHQ / SwiftTreeSitter

Swift API for the tree-sitter incremental parsing system
BSD 3-Clause "New" or "Revised" License
271 stars 30 forks source link

Add `reset` Method On Parser #30

Closed thecoolwinter closed 2 months ago

thecoolwinter commented 2 months ago

Adds a reset method to the Parser class, using the ts_parser_reset function. This is needed when using parser timeouts to make sure the parser starts from the beginning if an operation is abandoned.

mattmassicotte commented 2 months ago

Ah thank you!