satya-das / cppparser

A library to parse C/C++ source as AST
Other
278 stars 36 forks source link

Issue with variable initializer list... #15

Closed mischievous closed 2 weeks ago

mischievous commented 1 year ago

I have this snippet of code and I keep getting the error "Error: Unexpected '.', while in context=ctxGeneral(1), found at line#624". GCC/Clang both support this with out issue.

void processor64::pipe_thread (void) { pipeChannel pipe = {.raw = 0};
}

satya-das commented 1 year ago

Designated initializer is C++ 20 feature. CppParser will support this too. As of now, I am busy refactoring that will improve the object model and APIs. After I am done with that I will add a support for this.

satya-das commented 2 weeks ago

Designated initializer is now supported with commit c53ff4b.