Hi all,

I'm trying to use c2nim tool to convert some internal c library's header and I ran into two issues. The C Header has preprocessor defines like the following

#define TK_DataType_FBR			'FBR8'

Trying to parse this gives me an error like this

" Error: missing final ' for character literal".

The issue is if it's just a few constants, I would convert them manually by myself but the header has hundreds of such macros.

Another issue I ran into is with structs that have members conditionally declared by macros like this

typedef struct {
                #ifdef	LOW_PRECISION
                        short	_xS16;
                        short	_yS16;
                        int	_xL32;
                        int	_yL32;
        } GIS_Pt;

This gives me an error like this

 Error: identifier expected, but found '}'
Any help would be much appreciated. Thanks.

2017-09-09 02:05:12
Not sure because i don't have experience with this tool, but it might be a bug. Try reporting it in github issues section. 2017-09-11 08:02:40