X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogramparser.cpp;h=c6cdfd06246f1c14683919fcfec637b8adf85058;hb=a36992487d018d8801ead6980b362b00a2f5f5c5;hp=bf2d42daedbfd232dcc0dd194deb7c60ddf76625;hpb=73ce62f3b9c2bbfc1e655a9df343389a733dc795;p=libs%2Fgl.git diff --git a/source/programparser.cpp b/source/programparser.cpp index bf2d42da..c6cdfd06 100644 --- a/source/programparser.cpp +++ b/source/programparser.cpp @@ -310,7 +310,7 @@ bool ProgramParser::is_builtin_type(const string &token) bool ProgramParser::is_type(const string &token) { - return is_builtin_type(token) || cur_module->structs.count(token); + return is_builtin_type(token) || declared_types.count(token); } bool ProgramParser::is_identifier(const string &token) @@ -550,7 +550,7 @@ StructDeclaration *ProgramParser::parse_struct_declaration() parse_block(strct->members, true); expect(";"); - cur_module->structs[strct->name] = strct.get(); + declared_types.insert(strct->name); return strct.release(); }