aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/text_format.cc
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2016-07-13 13:47:51 -0700
committerFeng Xiao <xfxyjwf@gmail.com>2016-07-13 13:48:40 -0700
commit9086d9643903c608ab015b0b7d903547a4e7b6f3 (patch)
treeb47053ab6f6bde20b55c4fff4019c68a7c45545c /src/google/protobuf/text_format.cc
parent70c1ac756d3cd8fa04725f82f0ad1a30404c3bb3 (diff)
downloadprotobuf-9086d9643903c608ab015b0b7d903547a4e7b6f3.tar.gz
protobuf-9086d9643903c608ab015b0b7d903547a4e7b6f3.tar.bz2
protobuf-9086d9643903c608ab015b0b7d903547a4e7b6f3.zip
Integrate from internal code base.
Diffstat (limited to 'src/google/protobuf/text_format.cc')
-rw-r--r--src/google/protobuf/text_format.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/google/protobuf/text_format.cc b/src/google/protobuf/text_format.cc
index d49d8588..66b2648b 100644
--- a/src/google/protobuf/text_format.cc
+++ b/src/google/protobuf/text_format.cc
@@ -759,6 +759,20 @@ class TextFormat::Parser::ParserImpl {
}
return true;
}
+ if (TryConsume("[")) {
+ while (true) {
+ if (!LookingAt("{") && !LookingAt("<")) {
+ DO(SkipFieldValue());
+ } else {
+ DO(SkipFieldMessage());
+ }
+ if (TryConsume("]")) {
+ break;
+ }
+ DO(Consume(","));
+ }
+ return true;
+ }
// Possible field values other than string:
// 12345 => TYPE_INTEGER
// -12345 => TYPE_SYMBOL + TYPE_INTEGER