Fix CI: no backslash sequence in the lexer's doc comments
clang's -Wdocumentation-unknown-command reads "\u" in a doc comment as an unknown command, even in backticks. Two comments of the recovery code now say "Unicode escape" instead. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
2 files changed
+4
-4
No files matched your search
@@ -2121,7 +2121,7 @@ scan_number_done:
|
|||||||
read of the token and skips the rest:
|
read of the token and skips the rest:
|
||||||
|
|
||||||
- A string keeps its characters. An unknown escape stands for the escaped
|
- A string keeps its characters. An unknown escape stands for the escaped
|
||||||
character itself (as in JavaScript), an invalid `\u` escape and ill-formed
|
character itself (as in JavaScript), an invalid Unicode escape and ill-formed
|
||||||
UTF-8 become U+FFFD, and a control character is kept. A line break or the
|
UTF-8 become U+FFFD, and a control character is kept. A line break or the
|
||||||
end of the input ends a string that lacks its closing quote.
|
end of the input ends a string that lacks its closing quote.
|
||||||
- A number keeps its longest valid prefix, e.g. `1` for `1.` or `1e+`.
|
- A number keeps its longest valid prefix, e.g. `1` for `1.` or `1e+`.
|
||||||
@@ -2298,7 +2298,7 @@ scan_number_done:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// append a code point read from a `\u` escape; a surrogate becomes U+FFFD
|
/// append a code point read from a Unicode escape; a surrogate becomes U+FFFD
|
||||||
void add_escaped_codepoint(const int codepoint)
|
void add_escaped_codepoint(const int codepoint)
|
||||||
{
|
{
|
||||||
if (0xD800 <= codepoint && codepoint <= 0xDFFF)
|
if (0xD800 <= codepoint && codepoint <= 0xDFFF)
|
||||||
|
|||||||
@@ -12259,7 +12259,7 @@ scan_number_done:
|
|||||||
read of the token and skips the rest:
|
read of the token and skips the rest:
|
||||||
|
|
||||||
- A string keeps its characters. An unknown escape stands for the escaped
|
- A string keeps its characters. An unknown escape stands for the escaped
|
||||||
character itself (as in JavaScript), an invalid `\u` escape and ill-formed
|
character itself (as in JavaScript), an invalid Unicode escape and ill-formed
|
||||||
UTF-8 become U+FFFD, and a control character is kept. A line break or the
|
UTF-8 become U+FFFD, and a control character is kept. A line break or the
|
||||||
end of the input ends a string that lacks its closing quote.
|
end of the input ends a string that lacks its closing quote.
|
||||||
- A number keeps its longest valid prefix, e.g. `1` for `1.` or `1e+`.
|
- A number keeps its longest valid prefix, e.g. `1` for `1.` or `1e+`.
|
||||||
@@ -12436,7 +12436,7 @@ scan_number_done:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// append a code point read from a `\u` escape; a surrogate becomes U+FFFD
|
/// append a code point read from a Unicode escape; a surrogate becomes U+FFFD
|
||||||
void add_escaped_codepoint(const int codepoint)
|
void add_escaped_codepoint(const int codepoint)
|
||||||
{
|
{
|
||||||
if (0xD800 <= codepoint && codepoint <= 0xDFFF)
|
if (0xD800 <= codepoint && codepoint <= 0xDFFF)
|
||||||
|
|||||||
Reference in new issue
Block a user