THRIFT-655. Allow structs to be typedef'ed
authorDavid Reiss <dreiss@apache.org>
Tue, 9 Mar 2010 05:19:08 +0000 (05:19 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 9 Mar 2010 05:19:08 +0000 (05:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920657 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/thrifty.yy

index f0745d7..d12cca3 100644 (file)
@@ -168,7 +168,6 @@ const int struct_is_union = 1;
 %type<ttype>     TypeDefinition
 
 %type<ttypedef>  Typedef
-%type<ttype>     DefinitionType
 
 %type<ttype>     TypeAnnotations
 %type<ttype>     TypeAnnotationList
@@ -483,9 +482,9 @@ TypeDefinition:
     }
 
 Typedef:
-  tok_typedef DefinitionType tok_identifier
+  tok_typedef FieldType tok_identifier
     {
-      pdebug("TypeDef -> tok_typedef DefinitionType tok_identifier");
+      pdebug("TypeDef -> tok_typedef FieldType tok_identifier");
       t_typedef *td = new t_typedef(g_program, $2, $3);
       $$ = td;
     }
@@ -933,18 +932,6 @@ FieldValue:
       $$ = NULL;
     }
 
-DefinitionType:
-  BaseType
-    {
-      pdebug("DefinitionType -> BaseType");
-      $$ = $1;
-    }
-| ContainerType
-    {
-      pdebug("DefinitionType -> ContainerType");
-      $$ = $1;
-    }
-
 FunctionType:
   FieldType
     {