nodejs/llparse

Consider adding `pause` node

indutny opened this issue · 4 comments

There's http_parser_pause in http-parser repo. Not sure if we want to have it, or how it should work, but we should consider adding similar API.

There is a error_pos field in state now. It could be used for resuming parsing.

Looks like we got it working in c986905

As it is right now, only the span callback can actually pause consistently. Invoke has no way to do it properly. Perhaps we need p.pause(code, reason) node.

Maybe p.once(p.error(PAUSE_CODE, reason))?