You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2010/03/09 06:19:09 UTC

svn commit: r920657 - /incubator/thrift/trunk/compiler/cpp/src/thrifty.yy

Author: dreiss
Date: Tue Mar  9 05:19:08 2010
New Revision: 920657

URL: http://svn.apache.org/viewvc?rev=920657&view=rev
Log:
THRIFT-655. Allow structs to be typedef'ed

Modified:
    incubator/thrift/trunk/compiler/cpp/src/thrifty.yy

Modified: incubator/thrift/trunk/compiler/cpp/src/thrifty.yy
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/thrifty.yy?rev=920657&r1=920656&r2=920657&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/thrifty.yy (original)
+++ incubator/thrift/trunk/compiler/cpp/src/thrifty.yy Tue Mar  9 05:19:08 2010
@@ -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
     {