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

AfterShip / clickhouse-sql-parser / 27321031285

11 Jun 2026 03:05AM UTC coverage: 52.012%. Remained the same
27321031285

Pull #277

github

git-hulk
Rename lexer state to match what it holds

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>
Pull Request #277: Rename lexer state to match what it holds

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

1 existing line 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

75.38
/parser/parser_query.go


Build SHA Not Found

The commit SHA "7826a34f5c4725a649a326bb394f65d618a0c0dc" 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