update error message for invalid escape sequences

This commit is contained in:
Connor Skees 2021-07-30 06:49:15 -04:00
parent ebccebfed1
commit 5dd425a878
3 changed files with 3 additions and 3 deletions

View File

@ -117,7 +117,7 @@ impl<'a, 'b> Parser<'a, 'b> {
self.toks.next();
}
let c = std::char::from_u32(value).ok_or(("Invalid escape sequence.", span))?;
let c = std::char::from_u32(value).ok_or(("Invalid Unicode code point.", span))?;
if (identifier_start && is_name_start(c) && !c.is_digit(10))
|| (!identifier_start && is_name(c))
{

View File

@ -178,7 +178,7 @@ test!(
);
error!(
escape_sequence_does_not_fit_inside_char,
"a {\n color: \\110000;\n}\n", "Error: Invalid escape sequence."
"a {\n color: \\110000;\n}\n", "Error: Invalid Unicode code point."
);
test!(
escaped_newline_in_quoted_string,

View File

@ -399,7 +399,7 @@ error!(
);
error!(
invalid_escape,
"$\\110000: red;", "Error: Invalid escape sequence."
"$\\110000: red;", "Error: Invalid Unicode code point."
);
error!(
nothing_after_hash_in_variable_decl,