From 67fc63410d0b7065e70be52834bf6a724a7b00e5 Mon Sep 17 00:00:00 2001 From: Mark Slee Date: Wed, 29 Nov 2006 03:37:04 +0000 Subject: [PATCH] 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 --- compiler/cpp/src/thrift.y | 6 ++++++ 1 file changed, 6 insertions(+) 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"); -- 2.17.1