rust/compiler/rustc_parse/src/parser
Michael Goulet d6a42983e5
Rollup merge of #129899 - veera-sivarajan:fix-97793-pr-final, r=chenyukang
Add Suggestions for Misspelled Keywords

Fixes #97793

This PR detects misspelled keywords using two heuristics:

1. Lowercasing the unexpected identifier.
2. Using edit distance to find a keyword similar to the unexpected identifier.

However, it does not detect each and every misspelled keyword to
minimize false positives and ambiguities. More details about the
implementation can be found in the comments.
2024-09-07 14:21:22 +03:00
..
mut_visit Reformat use declarations. 2024-07-29 08:26:52 +10:00
tokenstream Reformat use declarations. 2024-07-29 08:26:52 +10:00
attr.rs Rollup merge of #128524 - chenyukang:yukang-fix-127930-invalid-outer-style-sugg, r=cjgillot 2024-08-24 21:03:31 -05:00
attr_wrapper.rs Overhaul token collection. 2024-08-16 09:07:55 +10:00
diagnostics.rs Add Suggestions for Misspelled Keywords 2024-09-06 23:07:45 -04:00
expr.rs Use bool in favor of Option<()> for diagnostics 2024-08-21 01:31:11 -04:00
generics.rs Overhaul token collection. 2024-08-16 09:07:55 +10:00
item.rs Rollup merge of #129667 - dev-ardi:rustc_driver-cleanup, r=michaelwoerister 2024-08-28 17:12:19 +02:00
mod.rs Overhaul token collection. 2024-08-16 09:07:55 +10:00
nonterminal.rs Don't make pattern nonterminals match statement nonterminals 2024-08-26 18:30:15 -04:00
pat.rs chore: Fix typos in 'compiler' (batch 2) 2024-09-02 07:50:22 +02:00
path.rs Don't make pattern nonterminals match statement nonterminals 2024-08-26 18:30:15 -04:00
stmt.rs Rollup merge of #128524 - chenyukang:yukang-fix-127930-invalid-outer-style-sugg, r=cjgillot 2024-08-24 21:03:31 -05:00
tests.rs Use assert_matches around the compiler 2024-08-11 12:25:39 -04:00
ty.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00