Update error.rs

This commit is contained in:
Shunsuke Shibayama 2022-10-14 01:03:23 +09:00
parent 1229179bbc
commit 1b16f80b76

View file

@ -32,8 +32,9 @@ pub fn binop_to_dname(op: &str) -> &str {
"<.." => "__lorng__", "<.." => "__lorng__",
"..<" => "__rorng__", "..<" => "__rorng__",
"<..<" => "__orng__", "<..<" => "__orng__",
"and" => "__and__", "&&" | "and" => "__and__",
"or" => "__or__", "||" | "or" => "__or__",
"^^" => "__xor__",
"in" => "__in__", "in" => "__in__",
"contains" => "__contains__", "contains" => "__contains__",
"subof" => "__subof__", "subof" => "__subof__",
@ -46,7 +47,7 @@ pub fn binop_to_dname(op: &str) -> &str {
"<=" => "__le__", "<=" => "__le__",
">" => "__gt__", ">" => "__gt__",
">=" => "__ge__", ">=" => "__ge__",
_ => todo!(), other => todo!("no such binary operator: {other}"),
} }
} }
@ -57,7 +58,7 @@ pub fn unaryop_to_dname(op: &str) -> &str {
"~" => "__invert__", "~" => "__invert__",
"!" => "__mutate__", "!" => "__mutate__",
"..." => "__spread__", "..." => "__spread__",
_ => todo!(), other => todo!("no such unary operator: {other}"),
} }
} }