2021-01-03 18:59:36 +01:00
|
|
|
/*
|
2021-04-22 22:51:19 +02:00
|
|
|
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
|
2021-01-03 18:59:36 +01:00
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2021-01-03 18:59:36 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2023-12-16 17:49:34 +03:30
|
|
|
#include <AK/ByteString.h>
|
2021-01-03 18:59:36 +01:00
|
|
|
#include <AK/Forward.h>
|
2022-02-04 17:19:22 +01:00
|
|
|
#include <LibGUI/GML/AST.h>
|
|
|
|
|
#include <LibGUI/GML/Parser.h>
|
2021-01-03 18:59:36 +01:00
|
|
|
|
2022-02-02 18:11:29 +01:00
|
|
|
namespace GUI::GML {
|
2021-01-03 18:59:36 +01:00
|
|
|
|
2023-12-16 17:49:34 +03:30
|
|
|
inline ErrorOr<ByteString> format_gml(StringView string)
|
2022-02-04 17:19:22 +01:00
|
|
|
{
|
2023-12-16 17:49:34 +03:30
|
|
|
return TRY(parse_gml(string))->to_byte_string();
|
2022-02-04 17:19:22 +01:00
|
|
|
}
|
2021-01-03 18:59:36 +01:00
|
|
|
|
|
|
|
|
}
|