streamly
streamly copied to clipboard
Try using absolute position in parsers instead of relative
That way we can pinpoint error locations. or maybe we can keep using the relative position in the parser, but keep track of the absolute offset in the parser driver.
In ParserK we will have to pass the absolute position around in the continuations. In Parser we can just maintain it in the driver. The position can include the byteOffset and lineCount (for Char/Byte streams only) up to the current chunk.