Chet does not translate "postfix" comments in a desirable way
Closed this issue · 1 comments
Oftentimes, C and C++ headers containing data type declarations (structs, enums, and so on) will have line-by-line comments that follow the field they're documenting, as opposed to preceding it. For example:
typedef struct S {
int A; /** Integral value */
char* C; /** String value */
float Y; /** Floating-point value */
} S;
When passed that code, Chet currently produces the following:
S = record
A: Integer;
(* Integral value *)
C: PUTF8Char;
(* String value *)
Y: Single;
end;
which of course when run through Pasdoc will have no comment associated with the A
field at all, and comments that are actually intended for the previous field for C
and Y
.
I'm aware that this perhaps might be somewhat difficult to implement, but it would certainly be a welcome bit of added functionality if there is any way to pull it off.
Unfortunately, the Clang backend used to parse the C code does not support extracting postfix comments in this way. Until they do, I don't see a way to fix this. Once Clang supports this, I will be happy to take a look at it. Closing this issue until then.