• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / jasengo / 19617131553

23 Nov 2025 08:53PM UTC coverage: 78.771% (+0.6%) from 78.21%
19617131553

push

github

web-flow
feat: Add RegexP parser for pattern matching (#12)

* feat: Pre-fill reader buffer on initialization

Implement initial pre-filling logic for `runeReader` buffers to
improve startup performance.

*   Bounded buffers pre-fill 25% of capacity.
*   Unbounded buffers pre-fill up to 64KB (2^16 runes).

Also adds tests for `State.Remaining()` behavior concerning the
newly introduced pre-filling step.

* feat: Add RegexP parser for pattern matching

Introduces a new parser constructor, `RegexP`, which allows
matching and consuming input based on a provided regular
expression pattern.

This commit also updates the `Fail` parser constructor to
accept an optional `error` cause, improving error context
propagation when defining failure states.

* Update parser/basic.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* test: Ensure RegexP handles Unicode input

Adds a test case to `TestRegexP` to confirm successful parsing
when the input string contains multi-byte characters.

* style: Remove duplicate comment in RegexP

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

21 of 25 new or added lines in 1 file covered. (84.0%)

423 of 537 relevant lines covered (78.77%)

0.92 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.98
/parser/basic.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc