diff options
Diffstat (limited to 'Libraries/LibJS/Runtime/PropertyAttributes.h')
-rw-r--r-- | Libraries/LibJS/Runtime/PropertyAttributes.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Libraries/LibJS/Runtime/PropertyAttributes.h b/Libraries/LibJS/Runtime/PropertyAttributes.h index d2fbe50ad7..44a3343947 100644 --- a/Libraries/LibJS/Runtime/PropertyAttributes.h +++ b/Libraries/LibJS/Runtime/PropertyAttributes.h @@ -26,7 +26,7 @@ #pragma once -#include <AK/LogStream.h> +#include <AK/Format.h> #include <AK/Types.h> namespace JS { @@ -87,8 +87,18 @@ private: u8 m_bits; }; -const LogStream& operator<<(const LogStream& stream, const PropertyAttributes& attributes); - const PropertyAttributes default_attributes = Attribute::Configurable | Attribute::Writable | Attribute::Enumerable; } + +namespace AK { + +template<> +struct Formatter<JS::PropertyAttributes> : Formatter<u8> { + void format(TypeErasedFormatParams& params, FormatBuilder& builder, const JS::PropertyAttributes& attributes) + { + Formatter<u8>::format(params, builder, attributes.bits()); + } +}; + +} |