diff options
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r-- | src/parser_bison.y | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y index dfe30683..e73e1ecd 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -3078,8 +3078,16 @@ variable_expr : '$' identifier sym = symbol_get(scope, $2); if (!sym) { - erec_queue(error(&@2, "unknown identifier '%s'", $2), - state->msgs); + sym = symbol_lookup_fuzzy(scope, $2); + if (sym) { + erec_queue(error(&@2, "unknown identifier '%s'; " + "did you mean identifier ā%sā?", + $2, sym->identifier), + state->msgs); + } else { + erec_queue(error(&@2, "unknown identifier '%s'", $2), + state->msgs); + } xfree($2); YYERROR; } |