Commit graph

6 commits

Author SHA1 Message Date
Idan Horowitz
280e99073b LibGUI: Stop dropping comments between children and end of GML objects
Any left-over comments in the pending_comments vector are now inserted
as sub object children, as these are serialized last and will therefore
show up in their expected location.
2022-04-08 19:19:37 +03:00
Idan Horowitz
40c40b7551 LibGUI: Insert parsed comments in parsing order
We were accidentally reversing the order of consecutive comments when
inserting them as children of the GML object.
2022-04-08 19:19:37 +03:00
Idan Horowitz
c56bc49b70 LibGUI: Remove left-over spammy debug print 2022-04-08 19:19:37 +03:00
Idan Horowitz
d4f08b3096 LibGUI: Enforce new GML newline and ordering guidelines
Specifically:
 * Properties must precede sub-object declarations.
 * There shouldn't be any newlines in-between properties.
 * There should be a newline in-between each sub-object.
 * Object declarations must include the curly braces.
 * There should be a newline between the properties of an object and
   it's sub-objects.
2022-02-13 02:36:35 +02:00
kleines Filmröllchen
41ef4f11dc 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 :^)
2022-02-07 18:39:50 +01:00
kleines Filmröllchen
4931c88b13 LibGUI: Remove GML prefix in favor of proper namespace
Prefixes are very much a C thing which we don't need in C++. This commit
moves all GML-related classes in LibGUI into the GUI::GML namespace, a
change somewhat overdue.
2022-02-07 18:39:50 +01:00
Renamed from Userland/Libraries/LibGUI/GMLParser.cpp (Browse further)