Skip to content

fix(lexer): restore debug assert in Lexer::finish_next#11208

Closed
overlookmotel wants to merge 1 commit intomainfrom
05-21-fix_lexer_restore_debug_assert_in_lexer_finish_next_
Closed

fix(lexer): restore debug assert in Lexer::finish_next#11208
overlookmotel wants to merge 1 commit intomainfrom
05-21-fix_lexer_restore_debug_assert_in_lexer_finish_next_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented May 21, 2025

#11204 removed a debug_assert! from Lexer::finish_next which checks that end of a Token is always >= start.

I assume this was unintentional, as this check is useful for making sure lexer is operating correctly in conformance tests. Restore it.

Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added A-parser Area - Parser C-bug Category - Bug labels May 21, 2025
@overlookmotel overlookmotel marked this pull request as ready for review May 21, 2025 08:40
@overlookmotel overlookmotel requested a review from Boshen May 21, 2025 08:40
@overlookmotel
Copy link
Member Author

@Boshen I assume removing it was unintentional?

@codspeed-hq
Copy link

codspeed-hq bot commented May 21, 2025

CodSpeed Instrumentation Performance Report

Merging #11208 will not alter performance

Comparing 05-21-fix_lexer_restore_debug_assert_in_lexer_finish_next_ (74b405d) with main (8e8dea5)

Summary

✅ 38 untouched benchmarks

@Boshen
Copy link
Member

Boshen commented May 21, 2025

It's checked here

debug_assert!(end >= start, "Token end ({end}) cannot be less than start ({start})");

@Boshen Boshen closed this May 24, 2025
@overlookmotel
Copy link
Member Author

Oh sorry I completely missed that.

@overlookmotel overlookmotel deleted the 05-21-fix_lexer_restore_debug_assert_in_lexer_finish_next_ branch May 27, 2025 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants