From: David Reiss Date: Tue, 9 Mar 2010 05:19:08 +0000 (+0000) Subject: THRIFT-655. Allow structs to be typedef'ed X-Git-Tag: 0.3.0~102 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=4dd7801e90fe10a6614890f3d176716582b04233;p=common%2Fthrift.git THRIFT-655. Allow structs to be typedef'ed git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920657 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/compiler/cpp/src/thrifty.yy b/compiler/cpp/src/thrifty.yy index f0745d7a..d12cca39 100644 --- a/compiler/cpp/src/thrifty.yy +++ b/compiler/cpp/src/thrifty.yy @@ -168,7 +168,6 @@ const int struct_is_union = 1; %type TypeDefinition %type Typedef -%type DefinitionType %type TypeAnnotations %type 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 {