1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 21:35:06 +00:00

Unicode: Try s/codepoint/code_point/g again

This time, without trailing 's'. Ran:

    git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
This commit is contained in:
Nico Weber 2020-08-05 16:31:20 -04:00 committed by Andreas Kling
parent 19ac1f6368
commit ce95628b7f
45 changed files with 441 additions and 441 deletions

View file

@ -50,11 +50,11 @@ public:
EndOfFile,
};
static HTMLToken make_character(u32 codepoint)
static HTMLToken make_character(u32 code_point)
{
HTMLToken token;
token.m_type = Type::Character;
token.m_comment_or_character.data.append(codepoint);
token.m_comment_or_character.data.append(code_point);
return token;
}
@ -73,11 +73,11 @@ public:
bool is_character() const { return m_type == Type::Character; }
bool is_end_of_file() const { return m_type == Type::EndOfFile; }
u32 codepoint() const
u32 code_point() const
{
ASSERT(is_character());
Utf8View view(m_comment_or_character.data.string_view());
ASSERT(view.length_in_codepoints() == 1);
ASSERT(view.length_in_code_points() == 1);
return *view.begin();
}
@ -86,7 +86,7 @@ public:
// NOTE: The parser considers '\r' to be whitespace, while the tokenizer does not.
if (!is_character())
return false;
switch (codepoint()) {
switch (code_point()) {
case '\t':
case '\n':
case '\f':