typelevel / typelevel/cats-parse

add ability to parse substrings

Open
#185 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
245
Forks
51
Avg merge
3h 20m
Merged PRs (30d)
1

Description

Currently, we can only parse from entire strings. It would be nice to be able to parse a string at a given offset and only up to a given length.

This would allow you to parse the inside of a string that might be provided by another process without having to copy.

Should be as simple as updating State.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the parser State implementation, which the issue identifies as the likely entry point. Determine how an offset and length could be represented without copying the source string, then verify that parsing can be bounded to the requested substring and that existing whole-string parsing remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.