LibWebView+LibUnicode: Remove (nearly) unused GeneratorUtil header

This header held a bunch of utility functions shared across several code
generators. The only user of any of these utilities now is the public
suffix generator. Move the one used function to that generator, and
remove the common header.
This commit is contained in:
Timothy Flynn 2024-09-06 15:52:08 -04:00 committed by Tim Flynn
parent 5eda629326
commit 28f27ff1c4
Notes: github-actions[bot] 2024-09-06 20:37:11 +00:00
2 changed files with 9 additions and 153 deletions

View file

@ -4,7 +4,6 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "../LibUnicode/GeneratorUtil.h"
#include <AK/SourceGenerator.h>
#include <AK/StringBuilder.h>
#include <LibCore/ArgsParser.h>
@ -14,6 +13,15 @@
ErrorOr<void> generate_header_file(Core::InputBufferedFile&, Core::File&);
ErrorOr<void> generate_implementation_file(Core::InputBufferedFile&, Core::File&);
static ErrorOr<NonnullOwnPtr<Core::InputBufferedFile>> open_file(StringView path, Core::File::OpenMode mode)
{
if (path.is_empty())
return Error::from_string_literal("Provided path is empty, please provide all command line options");
auto file = TRY(Core::File::open(path, mode));
return Core::InputBufferedFile::create(move(file));
}
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
StringView generated_header_path;