Skip to content

fix(lib): reset parser options after use#4361

Merged
clason merged 1 commit intorelease-0.25from
backport-4355-to-release-0.25
Apr 15, 2025
Merged

fix(lib): reset parser options after use#4361
clason merged 1 commit intorelease-0.25from
backport-4355-to-release-0.25

Conversation

@tree-sitter-ci-bot
Copy link

Description

Backport of #4355 to release-0.25.

**Problem:** After `ts_parser_parse_with_options()`, the parser options
are still stored in the parser object, meaning that a successive call to
`ts_parser_parse()` will actually behave like
`ts_parser_parse_with_options()`, which is not obvious and can have
unintended consequences.

**Solution:** Reset to empty options state after
`ts_parser_parse_with_options()`.

(cherry picked from commit 733d751)
@clason clason merged commit 62cc419 into release-0.25 Apr 15, 2025
12 checks passed
@clason clason deleted the backport-4355-to-release-0.25 branch April 15, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants