This repository was archived by the owner on Sep 12, 2024. It is now read-only.
-
Couldn't load subscription status.
- Fork 22
This repository was archived by the owner on Sep 12, 2024. It is now read-only.
Trailing comma isn't supported in Jaclang #613
Copy link
Copy link
Open
Description
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.

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
Labels
No labels