mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibGUI: Move GML parsing and formatting to new AST
This commit introduces a couple of connected changes that are hard to untangle, unfortunately: - Parse GML into the AST instead of JSON - Change the load_from_json API on Widget to load_from_gml_ast - Remove this same API from Core::Object as it isn't used outside of LibGUI and was a workaround for the object registration detection; by verifying the objects we're getting and casting we can remove this constraint. - Format GML by calling the formating APIs on the AST itself; remove GMLFormatter.cpp as it's not needed anymore. After this change, GML formatting already respects comments :^)
This commit is contained in:
parent
1806b297b6
commit
41ef4f11dc
Notes:
sideshowbarker
2024-07-17 19:39:15 +09:00
Author: https://github.com/kleinesfilmroellchen
Commit: 41ef4f11dc
Pull-request: https://github.com/SerenityOS/serenity/pull/12281
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/linusg
10 changed files with 127 additions and 236 deletions
|
@ -8,9 +8,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Forward.h>
|
||||
#include <LibGUI/GML/AST.h>
|
||||
|
||||
namespace GUI::GML {
|
||||
|
||||
JsonValue parse_gml(StringView);
|
||||
ErrorOr<NonnullRefPtr<GMLFile>> parse_gml(StringView);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue