Closed maiha closed 8 years ago
There is a problem that struct.var could be registered twice. The minimum example is
struct.var
struct struct_foo { struct struct_bar* bar; }; struct struct_bar { int x; }; typedef struct struct_bar struct_bar;
In this case, visit_var_declaration is called twice about struct_bar.x on reference and definitioin. Then, our parser produces as following.
struct_bar.x
struct StructBar x : LibC::Int x : LibC::Int end
This pr fixes it, and produces expected code.
struct StructBar x : LibC::Int end
Thanks.
Looks good, thank you! :-)
There is a problem that
struct.var
could be registered twice. The minimum example isIn this case, visit_var_declaration is called twice about
struct_bar.x
on reference and definitioin. Then, our parser produces as following.This pr fixes it, and produces expected code.
Thanks.