Allow newlines after match
condition commas without requiring backslashes at end of each line
#2201
Labels
match
condition commas without requiring backslashes at end of each line
#2201
Describe the project you are working on
I want the following statement to be more legible
Describe the problem or limitation you are having in your project
It is difficult to read each of the possible match conditions when they are forced to be on the same line.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
GDScript should allow a newline after the comma in a
match
case with multiple conditions. Compare the above example this this one:Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If the
match
condition has a comma followed by a newline, the parser should process the next line as another condition of the same case (expecting the indent to be the same).If this enhancement will not be used often, can it be worked around with a few lines of script?
The legibility cannot be worked around.A blackslash after each comma will allow the parser to treat them as if they are on the same line, but this may not be obvious to or expected by all developers
Is there a reason why this should be core and not an add-on in the asset library?
Not applicable. This is a language parsing issue.
The text was updated successfully, but these errors were encountered: