hsutter / cppfront

A personal experimental C++ Syntax 2 -> Syntax 1 compiler
Other
5.23k stars 224 forks source link

[BUG] trailing comma is not allowed on assert statements #1118

Closed DyXel closed 1 week ago

DyXel commented 2 weeks ago

Describe the bug Title. An assert should behave just like a function call.

main: () = {
    foo(a, b,); // works
    assert(true, "some_potentially_long_string",); // doesn't work
}

Output:

test.cpp2...
test.cpp2(3,48): error: expected ')' at the end of the contract (at ',')
hsutter commented 1 week ago

Thanks! Fixed by #1121.