Merge pull request #208 from C-BJ/main

compiler: Improve error messages
This commit is contained in:
Shunsuke Shibayama 2022-10-14 14:47:43 +09:00 committed by GitHub
commit 40247a0891
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1353,10 +1353,10 @@ impl LowerError {
AssignError,
loc,
switch_lang!(
"japanese" => format!("変数{YELLOW}{name}{RESET}再代入されています"),
"simplified_chinese" => format!("不能为变量{YELLOW}{name}{RESET}分配"),
"traditional_chinese" => format!("不能為變量{YELLOW}{name}{RESET}分配"),
"english" => format!("cannot assign twice to the variable {YELLOW}{name}{RESET}"),
"japanese" => format!("変数{YELLOW}{name}{RESET}複数回代入することはできません"),
"simplified_chinese" => format!("不能为变量{YELLOW}{name}{RESET}分配"),
"traditional_chinese" => format!("不能為變量{YELLOW}{name}{RESET}分配"),
"english" => format!("variable {YELLOW}{name}{RESET} cannot be assigned more than once"),
),
None,
),