Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Trailing comma isn't supported in Jaclang #613

@TharukaCkasthuri

Description

@TharukaCkasthuri

The Trailing comma isn't supported in Jaclang, and in some cases, when we mistakenly add a trailing comma, it throws a recursion error (RecursionError: maximum recursion depth exceeded) as in the screenshot.
Screenshot 2024-09-09 at 16 05 11

The example code in python;

ft.Column(
                spacing=25,
                controls=[
                    self.filter,
                    self.tasks,
                    ft.Row(
                        alignment=ft.MainAxisAlignment.SPACE_BETWEEN,
                        vertical_alignment=ft.CrossAxisAlignment.CENTER,
                        controls=[
                            self.items_left,
                            ft.OutlinedButton(
                                text="Clear completed", on_click=self.clear_clicked
                            ),
                        ],
                    ),
                ],
            )

The code we are supposed to write in Jaclang;

   ft.Column(
               spacing=25,
               controls=[
                   self.filter,
                   self.tasks,
                   ft.Row(
                       alignment=ft.MainAxisAlignment.SPACE_BETWEEN,
                       vertical_alignment=ft.CrossAxisAlignment.CENTER,
                       controls=[
                           self.items_left,
                           ft.OutlinedButton(
                               text="Clear completed", on_click=self.clear_clicked
                           )
                       ]
                   )
               ]
           );

it is good if the Trailing comma is made optional, similar to Python.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions