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

fix syntax errors #8

Merged
merged 3 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion examples/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
funcion consigue(&mismo, llave: Cadena) -> Resultado<Opción<&Cadena>, Cadena>;
}

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
Loading