mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 21:01:10 +00:00
Update error.rs
This commit is contained in:
parent
1229179bbc
commit
1b16f80b76
1 changed files with 5 additions and 4 deletions
|
@ -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}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue