Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Interleave Expr parsing and scanning better #341

Merged
merged 1 commit into from
Nov 4, 2024
Merged

Interleave Expr parsing and scanning better #341

merged 1 commit into from
Nov 4, 2024

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Nov 4, 2024

Previously, if Expr::parse returned an error, the macro would fall back to the infallible codepath from #340 for all expressions in the format args. In this PR it first tries scanning the invalid expression using #337 before falling back. The scanner is more robust for handling input in real-time as an expression is being typed.

@dtolnay dtolnay merged commit c92ac99 into master Nov 4, 2024
18 checks passed
@dtolnay dtolnay deleted the parsescan branch November 4, 2024 16:28
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant