mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
LibWeb: Break friendship between CSS Token and Parser :^(
The Parser no longer needs to mess with Token's internals, since we have getter functions that are safer.
This commit is contained in:
parent
d37f62fd54
commit
9286aa77bc
2 changed files with 9 additions and 4 deletions
|
@ -14,7 +14,6 @@
|
|||
namespace Web::CSS {
|
||||
|
||||
class Token {
|
||||
friend class Parser;
|
||||
friend class Tokenizer;
|
||||
|
||||
public:
|
||||
|
@ -71,6 +70,12 @@ public:
|
|||
return m_value.string_view();
|
||||
}
|
||||
|
||||
StringView function() const
|
||||
{
|
||||
VERIFY(m_type == Type::Function);
|
||||
return m_value.string_view();
|
||||
}
|
||||
|
||||
StringView delim() const
|
||||
{
|
||||
VERIFY(m_type == Type::Delim);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue