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

moonbitlang / core / 7689
88%

Build:
DEFAULT BRANCH: main
Ran 29 Oct 2026 11:38PM UTC
Jobs 1
Files 676
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Oct 2026 11:35PM UTC coverage: 88.27% (+0.2%) from 88.021%
7689

push

github

bobzhang
feat(bytes): add BytesRegex, a regex over bytes with its own byte engine

BytesRegex has the API of @string.Regex over BytesView: construction from a
pattern string, execute with last_index, and match groups and names. Its
parser (bytes/internal/regex_parser) and lazy DFA engine
(bytes/internal/regex_engine) mirror the string ones file by file, so the two
can be diffed, but share no code with them, not even the shared regex types:

- an atom is one byte, '.' is any byte, \xHH is a byte; \u escapes and
  non-ASCII pattern characters are errors; (?i:...), \b and POSIX classes
  are ASCII; errors are reported at the start of the construct, as in the
  string parser;
- bytes/internal/regex_engine/shared_types has the engine's own Category and
  QuantifierMode, and a 256-bit ByteSet in place of RecharSet;
- the symbol table is a flat 256-entry byte table: one load per input byte,
  without the fast_limit branch and bounds check of the string table;
- the byte profile is fixed, so there is no Profile.

A differential test runs BytesRegex and @string.Regex on generated ASCII
patterns (some deliberately broken) and inputs, on every atom against every
ASCII byte, and at the parser limits, and requires the same errors,
matches, groups and views. A benchmark runs both on the same ASCII inputs.

BytesRegex is not re-exported from the prelude yet.

664 of 677 new or added lines in 16 files covered. (98.08%)

24862 of 28166 relevant lines covered (88.27%)

409151.75 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
96.71
bytes/internal/regex_parser/parser.mbt
3
98.13
bytes/internal/regex_engine/dfa.mbt
3
75.0
bytes/internal/regex_engine/shared_types/category.mbt
1
97.06
bytes/internal/regex_engine/execute.mbt
1
96.97
bytes/internal/regex_parser/parser_util.mbt
Jobs
ID Job ID Ran Files Coverage
1 7689.1 29 Oct 2026 11:38PM UTC 676
88.27
GitHub Action Run
Source Files on build 7689
  • Tree
  • List 676
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 73c25740 on github
  • Prev Build on main (#7685)
  • Next Build on main (#7694)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc