diff --git a/AK/Format.cpp b/AK/Format.cpp index 159813cfa40..b259684d97e 100644 --- a/AK/Format.cpp +++ b/AK/Format.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -35,21 +36,6 @@ namespace AK { -class FormatParser : public GenericLexer { -public: - struct FormatSpecifier { - StringView flags; - size_t index; - }; - - explicit FormatParser(StringView input); - - StringView consume_literal(); - bool consume_number(size_t& value); - bool consume_specifier(FormatSpecifier& specifier); - bool consume_replacement_field(size_t& index); -}; - namespace { static constexpr size_t use_next_index = NumericLimits::max(); diff --git a/AK/FormatParser.h b/AK/FormatParser.h new file mode 100644 index 00000000000..82e2f75abca --- /dev/null +++ b/AK/FormatParser.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2024, kleines Filmröllchen + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include + +namespace AK { + +class FormatParser : public GenericLexer { +public: + struct FormatSpecifier { + StringView flags; + size_t index; + }; + + explicit FormatParser(StringView input); + + StringView consume_literal(); + bool consume_number(size_t& value); + bool consume_specifier(FormatSpecifier& specifier); + bool consume_replacement_field(size_t& index); +}; + +}