Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajout de nouveaux identifiers très utiles pour faire un programme #68

Open
wants to merge 5 commits into
base: principale
Choose a base branch
from
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
72 changes: 72 additions & 0 deletions rouille_proc_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,85 @@ rouille_compilogenese::rouille! {
"en_tant_que_chaîne" => "as_str",
"portée" => "span",
"Tableau" => "Vec",
"tab" => "vec",
"flux" => "stream",
"pousser" => "push",
"étendre" => "extend",
"délimiteur" => "delimiter",
"Ponctuation" => "Punct",
"Litéral" => "Literal",
"macro_procédurale" => "proc_macro",
"LectureBufferisée" => "BufRead",
"Lecture" => "Read",
"Écriture" => "Write",
"entrée_sortie" => "io",
"entrée" => "stdin",
"sortie" => "stdout",
"lire_ligne" => "read_line",
"écrire_ligne" => "write_line",
"écrire" => "write",
"est_vide" => "is_empty",
"est" => "is",
"verrouiller" => "lock",
"octets" => "bytes",
"chaîne" => "str",
"lire_exactement" => "read_exact",
"sépare" => "split",
"sépare_avec_les_espaces" => "split_whitespace",
"en_tant_que" => "as",
"ensuite" => "then",
"ensuite_quelque" => "then_some",
"déballer_ou" => "unwrap_or",
"déballer_ou_avec" => "unwrap_or_else",
"depuis_chaîne" => "from_str",
"Depuis" => "From",
"bien" => "ok",
"bien_ou" => "ok_or",
"bien_ou_avec" => "ok_or_else",
"en_tant_que_déréférencé" => "as_deref",
"en_tant_que_déréférencé_mutable" => "as_mut_deref",
Copy link
Owner

Choose a reason for hiding this comment

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

mais.

Copy link
Author

Choose a reason for hiding this comment

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

Je ne comprends pas votre commentaire. Pouvez vous précisez ?

Copy link
Owner

Choose a reason for hiding this comment

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

Aucune référence à ce nom n'est trouvable dans la bibliothèque standard Rouille.

"itérable" => "iter",
"itérable_mut" => "iter_mut",
"énumérer" => "enumerate",
"filtre" => "filter",
"filtre_applique" => "filter_map",
"applique" => "map",
"applique_ou" => "map_or",
"applique_ou_avec" => "map_or_else",
"applique_arf" => "map_err",
"pour_chaque" => "for_each",
"essayer_pour_chaque" => "try_for_each",
"applatir" => "flatten",
"applatir_en_appliquant" => "flat_map",
"compter" => "count",
"trouve" => "find",
"trouve_en_appliquant" => "find_map",
"tous" | "toutes" => "all",
"certains" | "certaines" => "any",
"récupérer" => "collect",
"copié" => "copied",
"cloné" => "cloned",
"Copiable" => "Copy",
"Clonable" => "Clone",
"processus" => "process",
"interpète" => "parse",
"taille_non_signée" => "usize",
"taille_signée" => "isize",
"entier_non_signé_8" => "u8",
"entier_non_signé_32" => "u32",
"entier_non_signé_64" => "u64",
"entier_signé_8" => "i8",
"entier_signé_32" => "i32",
"entier_signé_64" => "i64",
"flottant_32" => "f32",
"flottant_64" => "f64",
"caractère" => "char",
"bibliothèque_standard" => "std",
"arf_affiche" => "eprintln",
"dégage" => "exit",
"Eg" => "Eq",
"EgPartiel" => "PartialEq",
"longueur" => "len",
_ => &identifiant_chaîne,
};

Expand Down