diff options
author | jfarrell <jfarrell@apache.org> | 2014-04-08 22:45:01 -0400 |
---|---|---|
committer | jfarrell <jfarrell@apache.org> | 2014-04-08 22:45:01 -0400 |
commit | e0e831683897ea4b786eebabd0cea77659d77150 (patch) | |
tree | f0a7e4bbd410047e6022657d568abc593013b6d0 /compiler/cpp/Makefile.am | |
parent | bea3144a456a635c7a2e84c92277c5ad27f892d6 (diff) | |
download | thrift-e0e831683897ea4b786eebabd0cea77659d77150.tar.gz |
THRIFT-2421: Tree/Recursive struct support in thrift
Client: cpp
Patch: Dave Watson
Github Pull Request: This closes #84
----
commit b6134cedf292845e5ed01052919894df6b561bf2
Date: 2014-03-20T18:12:04Z
Recursive structs support in parser
A common complaint is that you can't express trees or other recursive structures in thrift easily - unlike protobufs. This diff loosens up the parser to allow using structs before they are defined (and uses typedef as a forward declaration).
This diff is actually enough to make recursive types work for some dyamic languages (I tried php, works out of the box!)
Other languages will need forward declarations, or ways to box types, to make this work (i.e. C++ needs both forward decls and a way to express structs as pointers)
Diffstat (limited to 'compiler/cpp/Makefile.am')
-rw-r--r-- | compiler/cpp/Makefile.am | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/cpp/Makefile.am b/compiler/cpp/Makefile.am index 47725bd4c..001312132 100644 --- a/compiler/cpp/Makefile.am +++ b/compiler/cpp/Makefile.am @@ -49,6 +49,7 @@ thrift_SOURCES = src/main.cc \ src/parse/t_enum.h \ src/parse/t_enum_value.h \ src/parse/t_typedef.h \ + src/parse/t_typedef.cc \ src/parse/t_container.h \ src/parse/t_list.h \ src/parse/t_set.h \ |