Files
carbon-lang/toolchain/lex
Chandler Carruth 88160496e1 Fix which tokens the lexer flags as bracket-recovery tokens. (#7457)
`ErrorRecoveryBuffer::Apply` flagged each inserted token via the
pre-insertion index of the token it was inserted before. Once any
earlier insertion had been applied, that index no longer matches the
token's position in the merged list: with two closers inserted at the
same point (`{((}`), the second recovery token was left unflagged, and
with insertions at two separate points (`{(} {(}`), a real token was
flagged in the second one's place.

`IsRecoveryToken` now reports exactly the inserted tokens. This will
matter for `carbon format`: a recovery token's text exists in no source
byte range, so a minimal-edit model must know not to anchor edits on it.

Assisted-by: Claude Code
2026-07-06 14:39:50 +00:00
..
2026-07-04 06:42:02 +00:00
2026-07-04 06:42:02 +00:00
2026-07-04 06:42:02 +00:00
2026-07-04 06:42:02 +00:00
2026-07-04 06:42:02 +00:00