c2lang / c2c_native

C2 Compiler - written in C2
Apache License 2.0
24 stars 5 forks source link

Segfault on various uses of tab characters #10

Closed SchokiCoder closed 1 year ago

SchokiCoder commented 1 year ago

These lines cause segfaults respectively:

a   ;
a;  
    c_int a =   2;

Interestingly enough, when changing the type from cint to i32 or bool it doesn't segfault anymore. (For now, i have only tested cint, bool and i32)

bvdberg commented 1 year ago

Is that the whole file? Can you attach an exact file (or push on a branch). I cannot reproduce this yet

bvdberg commented 1 year ago

Fixed! It was not the parsing, but the diagnostic message (unknown variable a) that caused the crash