Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions rdza_proc_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ fn replace_ident(ident: Ident) -> Option<TokenTree> {

let new_str = match ident_str.as_str() {
"Źle" => "Err",
"Dobrze" => "Ok",
"Dobrze" | "Prawilnie" => "Ok",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Myślę, że oprócz Prawilnie powinniśmy dodatkowo wspierać Wporzo oraz Elegancko:

Suggested change
"Dobrze" | "Prawilnie" => "Ok",
"Dobrze" | "Prawilnie" | "Wporzo" | "Elegancko" => "Ok",

"Ciąg" => "String",
"MapaHaszy" => "HashMap",
"MapaHaszy" | "HaszMapa" => "HashMap",
"Wektor" => "Vec",
"Domyślny" | "Domyślna" | "Domyślne" => "Default",
"Błąd" => "Error",
Expand All @@ -22,7 +22,7 @@ fn replace_ident(ident: Ident) -> Option<TokenTree> {
"przełam" => "break",
"współbieżny" | "współbieżna" | "współbieżne" => "async",
"zaczekaj" => "await",
"zapętl" => "loop",
"zapętl" | "w_kółko" => "loop",
"przenieś" => "move",
"skrzynka" | "skrzynki" | "skrzynkę" | "skrzynia" | "skrzyni" | "skrzynię" => "crate",
"nieosiągalny_kod" => "unreachable_code",
Expand Down Expand Up @@ -62,13 +62,13 @@ fn replace_ident(ident: Ident) -> Option<TokenTree> {
"niech" => "let",
"statyczny" | "statyczna" | "statyczne" => "static",
"struktura" => "struct",
"spodziewaj_się" => "expect",
"spodziewaj_się" | "oczekuj" => "expect",
"dopóki" => "while",
"użyj" => "use",
"do" => "into",
"rób" => "do",
"prawda" => "true",
"enumeracja" => "enum",
"enumeracja" | "wyliczanie" | "wyliczanka" | "wyliczaj" => "enum",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moim zdaniem wyliczaj tutaj nie pasuje, bo to czasownik, a reszta to rzeczowniki.

Suggested change
"enumeracja" | "wyliczanie" | "wyliczanka" | "wyliczaj" => "enum",
"enumeracja" | "wyliczanie" | "wyliczanka" => "enum",


_ => &ident_str,
};
Expand Down