-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better format arguments in variant parser #32313
Conversation
This will have a big impact on the serialization of Variants in I'm in favor of it but that's 4.0 material, and we need to ensure that the parser can handle both styles (but saves it without extraneous spaces). The current style is likely @reduz's personal preference when he designed it, so we should also discuss it to reach a consensus before changing it. |
This could still be merged for 3.2 though.
And this possibly, as long as only the editor is impacted and we don't consider the discrepancy with serialized values an issue. |
From my testing, it ignores whitespace so even the following can be parsed successfully:
The only thing that's not allowed is having trailing commas. Adding support for trailing commas in constructors would allow for better VCS diffs (see #32124). |
1f770ed
to
1891207
Compare
The connections dialog changes were moved to the newly created #32357 commit. |
86debfc
to
26f9add
Compare
26f9add
to
64b2bcb
Compare
64b2bcb
to
c328de1
Compare
db71c6a
to
e6b6834
Compare
e6b6834
to
326bd36
Compare
326bd36
to
ead8aa1
Compare
ead8aa1
to
0ff4095
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code and change look good to me.
For the record, we should probably add more tests for VariantParser
(there's two strings in tests/test_config_file.h
affected by this PR but that's all, which shows that our coverage for Variant
serialization isn't top notch ;)).
Thanks! |
Removed extra spaces from the variant parser, which means that in the docs values will appear as
Vector2(0, 0)
instead ofVector( 0, 0 )
.