Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Calculate line, col from another Position #414
I am writing a parser using Pest, and I use Position to store the token position.
I've done this for another library: ideally, it should rfind the last
Even so, it would be useful to offer the incremental version, for truly massive use cases. (Unless you need a massive number of line/col pairs, just working with byte positions and lazily normalizing to line/col for display is quite doable and very performant. A surprisingly big factor is how much space you save by saving approximately a