mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:07:36 +00:00
Everywhere: Rename to_{string => deprecated_string}() where applicable
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
This commit is contained in:
parent
6e19ab2bbc
commit
57dc179b1f
597 changed files with 1973 additions and 1972 deletions
|
@ -73,33 +73,34 @@ bool Supports::Feature::evaluate() const
|
|||
});
|
||||
}
|
||||
|
||||
DeprecatedString Supports::Declaration::to_string() const
|
||||
DeprecatedString Supports::Declaration::to_deprecated_string() const
|
||||
{
|
||||
return DeprecatedString::formatted("({})", declaration);
|
||||
}
|
||||
|
||||
DeprecatedString Supports::Selector::to_string() const
|
||||
DeprecatedString Supports::Selector::to_deprecated_string() const
|
||||
{
|
||||
return DeprecatedString::formatted("selector({})", selector);
|
||||
}
|
||||
|
||||
DeprecatedString Supports::Feature::to_string() const
|
||||
DeprecatedString Supports::Feature::to_deprecated_string() const
|
||||
{
|
||||
return value.visit([](auto& it) { return it.to_string(); });
|
||||
return value.visit([](auto& it) { return it.to_deprecated_string(); });
|
||||
}
|
||||
|
||||
DeprecatedString Supports::InParens::to_string() const
|
||||
DeprecatedString Supports::InParens::to_deprecated_string() const
|
||||
{
|
||||
return value.visit(
|
||||
[](NonnullOwnPtr<Condition> const& condition) -> DeprecatedString { return DeprecatedString::formatted("({})", condition->to_string()); },
|
||||
[](auto& it) -> DeprecatedString { return it.to_string(); });
|
||||
[](NonnullOwnPtr<Condition> const& condition) -> DeprecatedString { return DeprecatedString::formatted("({})", condition->to_deprecated_string()); },
|
||||
[](Supports::Feature const& it) -> DeprecatedString { return it.to_deprecated_string(); },
|
||||
[](GeneralEnclosed const& it) -> DeprecatedString { return it.to_string(); });
|
||||
}
|
||||
|
||||
DeprecatedString Supports::Condition::to_string() const
|
||||
DeprecatedString Supports::Condition::to_deprecated_string() const
|
||||
{
|
||||
switch (type) {
|
||||
case Type::Not:
|
||||
return DeprecatedString::formatted("not {}", children.first().to_string());
|
||||
return DeprecatedString::formatted("not {}", children.first().to_deprecated_string());
|
||||
case Type::And:
|
||||
return DeprecatedString::join(" and "sv, children);
|
||||
case Type::Or:
|
||||
|
@ -108,9 +109,9 @@ DeprecatedString Supports::Condition::to_string() const
|
|||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
DeprecatedString Supports::to_string() const
|
||||
DeprecatedString Supports::to_deprecated_string() const
|
||||
{
|
||||
return m_condition->to_string();
|
||||
return m_condition->to_deprecated_string();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue