grpc bindings generator for Java and a few minor supporting changes i… (#4553)

* grpc bindings generator for Java and a few minor supporting changes in improvements

* restored formatting before my previous changes for ease of review

* Fixed grpc java code generation bug resulting in duplicate extractor declarations in case the same is used in more than a single RPC method
This commit is contained in:
Yuri Finkelstein
2017-12-21 07:55:57 -10:00
committed by Wouter van Oortmerssen
parent 61f4a46c43
commit 8518b3fb4e
8 changed files with 1288 additions and 6 deletions

View File

@@ -1645,6 +1645,7 @@ CheckedError Parser::ParseService() {
ECHECK(ParseMetaData(&service_def.attributes));
EXPECT('{');
do {
std::vector<std::string> rpc_comment = doc_comment_;
auto rpc_name = attribute_;
EXPECT(kTokenIdentifier);
EXPECT('(');
@@ -1660,6 +1661,7 @@ CheckedError Parser::ParseService() {
rpc.name = rpc_name;
rpc.request = reqtype.struct_def;
rpc.response = resptype.struct_def;
rpc.rpc_comment = rpc_comment;
if (service_def.calls.Add(rpc_name, &rpc))
return Error("rpc already exists: " + rpc_name);
ECHECK(ParseMetaData(&rpc.attributes));