-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
enhancementNew feature or requestNew feature or requesterror-messagesRelated to improving error messagesRelated to improving error messagesezcEZC compiler tool (EZ → C → native binary)EZC compiler tool (EZ → C → native binary)
Description
Typo Suggestions
When the compiler encounters an undefined identifier, suggest the closest match from the current scope.
error[E3001]: undefined variable 'countr'
--> main.ez:15:5
|
15 | countr++
| ^^^^^^
|
= help: did you mean 'counter'?
Checklist
- Implement Levenshtein distance (or similar edit distance) function
- On undefined variable/function/type, search scope for names within edit distance ≤ 2
- Suggest the closest match in the help text
- Apply to: variable names, function names, struct/enum type names, module names, enum member names
- Suggest EZ keywords when identifier is close to a keyword (e.g. `retrun` → `return`)
Dependencies
- Requires type checker / symbol table to know what's in scope
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesterror-messagesRelated to improving error messagesRelated to improving error messagesezcEZC compiler tool (EZ → C → native binary)EZC compiler tool (EZ → C → native binary)