Fix parsing of forward declaration of C++0x enums

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@13010 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-04-20 20:26:13 +00:00
commit fdb9f072a7
2 changed files with 19 additions and 9 deletions

View file

@ -3326,14 +3326,15 @@ c_enum_inherit : COLON primitive_type {
;
/* ------------------------------------------------------------
enum [class] Name;
enum [class] Name [: base_type];
------------------------------------------------------------ */
c_enum_forward_decl : storage_class c_enum_keyword c_enum_inherit ID SEMI {
c_enum_forward_decl : storage_class c_enum_keyword ename c_enum_inherit SEMI {
SwigType *ty = 0;
$$ = new_node("enumforward");
ty = NewStringf("enum %s", $4);
ty = NewStringf("enum %s", $3);
Setattr($$,"enumkeyword",$2);
Setattr($$,"name",$4);
Setattr($$,"name",$3);
Setattr($$,"type",ty);
Setattr($$,"sym:weak", "1");
add_symbols($$);