Age | Commit message (Collapse) | Author |
|
This prevents us from needing a sv suffix, and potentially reduces the
need to run generic code for a single character (as contains,
starts_with, ends_with etc. for a char will be just a length and
equality check).
No functional changes.
|
|
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).
No functional changes.
|
|
Error::from_string_literal now takes direct char const*s, while
Error::from_string_view does what Error::from_string_literal used to do:
taking StringViews. This change will remove the need to insert `sv`
after error strings when returning string literal errors once
StringView(char const*) is removed.
No functional changes.
|
|
This was previously fixed in #13572 with
546d338639cc090055d0c416a76fc237d06930c8
but regressed in #14251 with
ec40c93300a2b111129adf1a5badecde8c22889f
|
|
This is a bit of a hack, but it is an easy way to finally get spacers
into GML.
This will translate well if spacers are later to become child objects of
the continer widget.
|
|
This moves all code comprehension-related code to a new library,
LibCodeComprehension.
This also moves some types related to code comprehension tasks (such as
autocomplete, find declaration) out of LibGUI and into
LibCodeComprehension.
|
|
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.
|
|
We were accidentally reversing the order of consecutive comments when
inserting them as children of the GML object.
|
|
|
|
|
|
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules
"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
|
|
|
|
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.
|
|
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 Abstract Syntax Tree is specifically designed to represent GML and
also includes comments. It will be used in the next commit to replace
JSON in the GML system.
|
|
This was causing some macro redefinition errors after the headers ended
up in the same file through some includes. The simple fix is to undefine
the macro after use.
|
|
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.
|