Multiple independent parsers / reentrancy #62
Labels
compat hazard
Resolving this issue may create backwards compatibility problems
enhancement
Request for functionality covering an entirely new use case
Milestone
Currently, this code works:
It prints out:
This is because the library maintains a single lexer and parser state shared between invocations of the
parse
function; there is no way to concurrently parse multiple Lua scripts. Code that expects each.parse({ wait: true })
to create a new parser independent of any previously created one is in for a nasty surprise.There should be a way to create multiple isolated parser states. This will probably necessitate a quite invasive re-write, and may break some backwards compatibility unless this is done through separate API calls. Then though, the sort of code that relies on non-reentrancy is not one I wish to personally support.
The text was updated successfully, but these errors were encountered: