Skip to content

Recommended usage for multiple instances in a page #2024

Answered by msujew
k1w1 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @k1w1,

does some of your parse state persist over multiple parses? If not, you should be fine to just reuse the same parser for multiple parse calls. Since Chevrotain doesn't support async parsing, you cannot accidentally start the parser while the parsing is still in process. Consequently, two simultaneous parsing processes in the same JS context are impossible.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@k1w1
Comment options

Answer selected by k1w1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants