mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 12:24:45 +00:00
More names to put out with get_similar_name
This commit is contained in:
parent
8ada32dcba
commit
2bc861cbde
1 changed files with 11 additions and 0 deletions
|
@ -1160,6 +1160,17 @@ impl Context {
|
|||
}
|
||||
|
||||
pub(crate) fn get_similar_name(&self, name: &str) -> Option<&str> {
|
||||
match name {
|
||||
"true" => return Some("True"),
|
||||
"false" => return Some("False"),
|
||||
"Null" | "Nil" | "null" | "nil" | "none" => return Some("None"),
|
||||
"del" => return Some("Del"),
|
||||
"int" => return Some("Int"),
|
||||
"nat" => return Some("Nat"),
|
||||
"str" => return Some("Str"),
|
||||
"bool" => return Some("Bool"),
|
||||
_ => {}
|
||||
}
|
||||
let name = readable_name(name);
|
||||
// TODO: add decls
|
||||
get_similar_name(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue