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

moonbitlang / core / 4761
91%

Build:
DEFAULT BRANCH: main
Ran 26 Jun 2026 09:02AM UTC
Jobs 1
Files 379
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

26 Jun 2026 09:01AM UTC coverage: 90.964%. Remained the same
4761

push

github

bobzhang
refactor(json): use match in the hot number-scan and whitespace loops

Convert the two remaining char `if`/`else if` cascades in the lexer's
hot loops to `match`, finishing the pattern started in the merged
char-range refactors:

- scan_json_number: `if c is ('0'..='9') … else if c == '.' … else if
  c == 'e' || c == 'E'` becomes a `match` with `'0'..='9' as c`, `'.'`
  and `'e' | 'E'` arms (digit case still first).
- lex_skip_whitespace: `c == ' ' || c == '\t' || c == '\r' || c == '\n'`
  becomes a `' ' | '\t' | '\r' | '\n'` match arm.

Both sit on the JSON parse hot path, so this was benchmark-checked
(`moon bench -p json --target native --release`, n=1000 mixed
object/array). Interleaved A/B over the working tree shows the match
form is neutral-to-slightly-faster, never slower (e.g. 1.00 ms → ~0.95
ms in one block, parity in another). No behavior change; 175/175 tests
pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

20 of 20 new or added lines in 2 files covered. (100.0%)

15151 of 16656 relevant lines covered (90.96%)

197437.6 hits per line

Jobs
ID Job ID Ran Files Coverage
1 4761.1 26 Jun 2026 09:02AM UTC 380
90.98
GitHub Action Run
Source Files on build 4761
  • Tree
  • List 379
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3fa43b60 on github
  • Prev Build on main (#4751)
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