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

AfterShip / clickhouse-sql-parser / 27279412055

10 Jun 2026 01:23PM UTC coverage: 52.012% (+0.2%) from 51.826%
27279412055

push

github

web-flow
Add structured ParseError with O(log n) position lookup (#274)

Replace the stringly-typed parse error and its per-error full-input
rescan with a typed *ParseError that carries the byte offset, 1-based
line/column, the offending token, and the expected token kinds/keyword.

- error.go: ParseError type; Error() renders the line:col message plus a
  caret, matching the previous CLI presentation.
- source.go: lineStarts type maps a byte offset to a 1-based line/column
  via binary search over line-start offsets, built once on the first
  error instead of rescanning the input every time.
- parser_common.go: expectTokenKind/expectKeyword capture position and
  expected tokens at the failure site; wrapError finalizes any error
  into a *ParseError, leaving the long tail of fmt.Errorf sites working
  via the Msg field.

Note: line/column are now 1-based (previously 0-based) and error
messages were reworded; callers can now errors.As(err, &ParseError{}).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

77 of 98 new or added lines in 3 files covered. (78.57%)

43 existing lines in 1 file now uncovered.

8364 of 16081 relevant lines covered (52.01%)

3001.37 hits per line

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

83.28
/parser/parser_common.go


Build SHA Not Found

The commit SHA "3c3822c5e43a9f04244d9599fc8a1c4bd7ba8e2d" was not found in your repository, so the file cannot be loaded. This may be because you posted from a local development environment, or your CI created an ephemeral commit.

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