Skip to content

Conversation

jjmontesl
Copy link
Contributor

Apparently, lists can include a trailing comma (at least lists in the section header).

This is an example, in the section header:

[node name="Pit Water Trigger" type="Area2D" parent="Scene/Trial1/Acid Pit" groups=[
"WaterBody",
]]
visible = false
position = Vector2( -8.50171, -130.333 )
collision_layer = 256
collision_mask = 2147483649
script = ExtResource( 20 )
__meta__ = {
"_edit_group_": true
}

Note how the groups attribute is a list which contains newlines and a trailing separator (a comma). Newlines are not a problem for the parser but the comma was not supported.

This pull request modifies the parser definition to add support for trailing commas in list values.

@stevearc
Copy link
Owner

Looks good to me! Thanks!

@stevearc stevearc merged commit 5da2af5 into stevearc:master Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants