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

AfterShip / clickhouse-sql-parser / 27487335859

14 Jun 2026 03:39AM UTC coverage: 52.748%. Remained the same
27487335859

push

github

web-flow
Rename lexer state to match what it holds (#277)

l.lastToken and p.last() actually hold the *current* lookahead token -
the one the parser is looking at but has not consumed - not a
previously-consumed token. Likewise l.current held the input byte
offset, not a token. Rename for accuracy, no behavior change:

- lexerState.current (int)    -> offset
- lexerState.lastToken        -> current
- Parser.last()               -> cur()
- Parser.lastTokenKind()      -> curTokenKind()
- Parser.lastTokenString()    -> curTokenString()
- local `lastToken` vars      -> curToken (parser files)

The one genuinely-previous token - the local in Lexer.consumeToken used
to disambiguate unary +/- - is named prevToken.

Also give TokenKindDot its missing TokenKind type annotation.
---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

160 of 231 new or added lines in 8 files covered. (69.26%)

1 existing line in 1 file now uncovered.

8495 of 16105 relevant lines covered (52.75%)

2997.35 hits per line

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

66.78
/parser/parser_view.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