summaryrefslogtreecommitdiffstats
path: root/modules/mono/csharp_script.cpp
diff options
context:
space:
mode:
authorRyan Roden-Corrent <ryan@rcorre.net>2023-03-02 07:34:28 -0500
committerRyan Roden-Corrent <ryan@rcorre.net>2023-03-02 18:00:19 -0500
commitd3684e662fdf2611214efc721ea2276364ef9fe1 (patch)
treec8b58fb1f59ea41ffd0ad45ceb63ff79a7affb26 /modules/mono/csharp_script.cpp
parent31eccb5501ddc92b4a17fd6ae33dca4ad217702c (diff)
downloadredot-engine-d3684e662fdf2611214efc721ea2276364ef9fe1.tar.gz
Don't strip whitespace when converting 3to4.
Fixes #74204. The style guide says > Always use one space around operators and after commas The 3to4 conversion tool currently strips space in certain scenarios. I've updated it to add space whenever it is generating new code. In any case where it substitutes existing code, it leaves it as-is. For example, connect(a,b,c) becomes `connect(a, callable(b, c))`, because the converter is adding new commads/parens. However, `xform(Vector3(a,b,c))` becomes `Transform * Vector3(a,b,c)` because it uses the user's original Vector3 string whole. If the user originally had `xform(Vector3(a, b, c))`, then it becomes `Transform * Vector3(a, b, c)`. Ideally we'd always preserve original formatting, but this seems quite difficult, so I tried to preserve it where we can, but air on the side of following the style guide whenever we're transforming code.
Diffstat (limited to 'modules/mono/csharp_script.cpp')
0 files changed, 0 insertions, 0 deletions