hiulit / GDScriptify

A magical documentation tool for GDScript.
MIT License
48 stars 5 forks source link

Functions with arguments spanning multiple lines aren't picked up correctly #5

Open nyxkn opened 2 years ago

nyxkn commented 2 years ago

When writing library-type code it's common to end up with very long argument lines, which we might want to split.

An example from a library I was just working on:

func arc_normal(position: Vector3, normal: Vector3, angle_from: float, angle_to: float, radius: float = 1.0, draw_origin: bool = false, color: Color = current_color) -> void:

This should most definitely be split into two lines. Something like this:

func arc_normal(position: Vector3, normal: Vector3, angle_from: float, angle_to: float,
            radius: float = 1.0, draw_origin: bool = false, color: Color = current_color) -> void:

But when this is done, gdscriptify only picks up the first line and ignores the second.

hiulit commented 2 years ago

I'll have a look. It should work on Arrays and Dictionaries, but functions could have escaped the parsing.