From: Mark Slee Date: Wed, 29 Nov 2006 03:37:04 +0000 (+0000) Subject: Strings in JSON style thrift constants do not need quotes X-Git-Tag: 0.2.0~1590 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=67fc63410d0b7065e70be52834bf6a724a7b00e5;p=common%2Fthrift.git Strings in JSON style thrift constants do not need quotes Summary: Cause it's just too much work to put in quotes sometimes. struct thing = { a : 325, bb : 5632} OBVIOUSLY a and bb are strings. Duh. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664882 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/compiler/cpp/src/thrift.y b/compiler/cpp/src/thrift.y index c5db20b3..9dee5350 100644 --- a/compiler/cpp/src/thrift.y +++ b/compiler/cpp/src/thrift.y @@ -372,6 +372,12 @@ ConstValue: $$ = new t_const_value(); $$->set_string($1); } +| tok_identifier + { + pdebug("ConstValue => tok_identifier"); + $$ = new t_const_value(); + $$->set_string($1); + } | ConstList { pdebug("ConstValue => ConstList");