streamly icon indicating copy to clipboard operation
streamly copied to clipboard

Maintain negative count in parsers for backtracking

Open harendra-kumar opened this issue 7 months ago • 0 comments

Now we represent backtracking by negative offsets in the Partial/Continue constructors. In some parsers (e.g. deintercalate) we maintain a positive count and then for backtracking we negate it when returning the count, instead we can directly maintain a negative count, that makes the code simpler, same as it was before the change from +ve to -ve offsets in the constructors.

harendra-kumar avatar May 27 '25 00:05 harendra-kumar