Skip to content

Commit

Permalink
Merge pull request #8 from Rudxain/patch-1
Browse files Browse the repository at this point in the history
fix syntax errors
  • Loading branch information
UltiRequiem authored May 30, 2024
2 parents f73646e + e0d70d1 commit 646faf8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ rustico::rustico! {

estático mutable DICCIONARIO: Opcion<Diccionario<Cadena, Cadena>> = Ninguno;

Check warning on line 10 in examples/src/main.rs

View workflow job for this annotation

GitHub Actions / Rust project

static `DICCIONARIO` is never used

structura Concreto;
estructura Concreto;

Check warning on line 12 in examples/src/main.rs

View workflow job for this annotation

GitHub Actions / Rust project

struct `Concreto` is never constructed

implementa Hola para Concreto {
funcion escribe(&yo, llave: Cadena, valor: Cadena) {
Expand Down
8 changes: 4 additions & 4 deletions rustico/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ fn replace_ident(ident: Ident) -> Option<TokenTree> {
"como_cad" => "to_str",
"Hilo" => "Thread",
"hilo" => "thread",
"crear" => "spawn", // debería ser "aparecer"?
"crear" => "spawn", // debería ser "aparecer"?
"Diccionario" => "HashMap", // no hay traducción satisfactoria para "hash"
"Conjunto" => "HashSet",
"Defecto" => "Default",
"defecto" => "default",
"Errorsaso" => "Error", // errorsasasaso!!!
"Opcion" | "Opción" => "Option",
"Alguno" => "Some", // Algo == !Nada
"Alguno" => "Some", // Algo == !Nada
"Ninguno" => "None", // Nada = Nothing
"Resultado" => "Result",
"Yo" | "Mismo" => "Self",
"yo" | "mismo" => "self",
"imprimeln" => "println", // línea
"imprime" => "print", // no hay línea
"imprime" => "print", // no hay línea
"rompe" | "romper" => "break",
"proceso" => "process",
"Comando" => "Command",
Expand Down Expand Up @@ -103,7 +103,7 @@ fn replace_ident(ident: Ident) -> Option<TokenTree> {
"usando" | "usar" => "use",
"dentro_de" => "into",
"enumerado" | "enumeración" => "enum",
"Rasgo" => "Trait"
"Rasgo" => "Trait",
_ => &ident_str,
};

Expand Down

0 comments on commit 646faf8

Please sign in to comment.