refactor: remove extraneous whitespaces

This commit is contained in:
ToruNiina
2024-07-04 02:57:22 +09:00
parent a9fb557d70
commit 0df1dd6fea

View File

@@ -2702,7 +2702,7 @@ guess_number_type(const location& first, const context<TC>& ctx)
return ok(value_t::floating); return ok(value_t::floating);
} }
auto src = source_location(region(loc)); auto src = source_location(region(loc));
return err(make_error_info(error_kind::syntax_error, return err(make_error_info(error_kind::syntax_error,
"bad float: `_` must be surrounded by digits", "bad float: `_` must be surrounded by digits",
std::move(src), "invalid underscore", std::move(src), "invalid underscore",
"Hint: valid : +1.0, -2e-2, 3.141_592_653_589, inf, nan\n" "Hint: valid : +1.0, -2e-2, 3.141_592_653_589, inf, nan\n"
@@ -2723,7 +2723,7 @@ guess_number_type(const location& first, const context<TC>& ctx)
return ok(value_t::floating); return ok(value_t::floating);
} }
auto src = source_location(region(loc)); auto src = source_location(region(loc));
return err(make_error_info(error_kind::syntax_error, return err(make_error_info(error_kind::syntax_error,
"bad float: `_` must be surrounded by digits", "bad float: `_` must be surrounded by digits",
std::move(src), "invalid underscore", std::move(src), "invalid underscore",
"Hint: valid : +1.0, -2e-2, 3.141_592_653_589, inf, nan\n" "Hint: valid : +1.0, -2e-2, 3.141_592_653_589, inf, nan\n"
@@ -2750,7 +2750,7 @@ guess_number_type(const location& first, const context<TC>& ctx)
int_reg.as_string() == "-0" || int_reg.as_string() == "+0")) int_reg.as_string() == "-0" || int_reg.as_string() == "+0"))
{ {
auto src = source_location(region(loc)); auto src = source_location(region(loc));
return err(make_error_info(error_kind::syntax_error, return err(make_error_info(error_kind::syntax_error,
"bad integer: leading zero is not allowed in decimal int", "bad integer: leading zero is not allowed in decimal int",
std::move(src), "leading zero", std::move(src), "leading zero",
"Hint: valid : -42, 1_000, 1_2_3_4_5, 0xC0FFEE, 0b0010, 0o755\n" "Hint: valid : -42, 1_000, 1_2_3_4_5, 0xC0FFEE, 0b0010, 0o755\n"
@@ -2759,7 +2759,7 @@ guess_number_type(const location& first, const context<TC>& ctx)
else else
{ {
auto src = source_location(region(loc)); auto src = source_location(region(loc));
return err(make_error_info(error_kind::syntax_error, return err(make_error_info(error_kind::syntax_error,
"bad integer: `_` must be surrounded by digits", "bad integer: `_` must be surrounded by digits",
std::move(src), "invalid underscore", std::move(src), "invalid underscore",
"Hint: valid : -42, 1_000, 1_2_3_4_5, 0xC0FFEE, 0b0010, 0o755\n" "Hint: valid : -42, 1_000, 1_2_3_4_5, 0xC0FFEE, 0b0010, 0o755\n"
@@ -2771,7 +2771,7 @@ guess_number_type(const location& first, const context<TC>& ctx)
if(loc.current() == '0') if(loc.current() == '0')
{ {
loc.retrace(); loc.retrace();
return err(make_error_info(error_kind::syntax_error, return err(make_error_info(error_kind::syntax_error,
"bad integer: leading zero", "bad integer: leading zero",
source_location(region(loc)), "leading zero is not allowed", source_location(region(loc)), "leading zero is not allowed",
std::string("Hint: valid : -42, 1_000, 1_2_3_4_5, 0xC0FFEE, 0b0010, 0o755\n" std::string("Hint: valid : -42, 1_000, 1_2_3_4_5, 0xC0FFEE, 0b0010, 0o755\n"
@@ -2780,7 +2780,7 @@ guess_number_type(const location& first, const context<TC>& ctx)
} }
else // invalid digits, especially in oct/bin ints. else // invalid digits, especially in oct/bin ints.
{ {
return err(make_error_info(error_kind::syntax_error, return err(make_error_info(error_kind::syntax_error,
"bad integer: invalid digit after an integer", "bad integer: invalid digit after an integer",
source_location(region(loc)), "this digit is not allowed", source_location(region(loc)), "this digit is not allowed",
std::string("Hint: valid : -42, 1_000, 1_2_3_4_5, 0xC0FFEE, 0b0010, 0o755\n" std::string("Hint: valid : -42, 1_000, 1_2_3_4_5, 0xC0FFEE, 0b0010, 0o755\n"