const FormatToken &Left,
const FormatToken &Right) {
if (Style.Language == FormatStyle::LK_Proto) {
+ if (Right.is(tok::period) &&
+ (Left.TokenText == "optional" || Left.TokenText == "required" ||
+ Left.TokenText == "repeated"))
+ return true;
if (Right.is(tok::l_paren) &&
(Left.TokenText == "returns" || Left.TokenText == "option"))
return true;
" required int32 field1 = 1;\n"
"}");
verifyFormat("message SomeMessage {\n"
+ " required .absolute.Reference field1 = 1;\n"
+ "}");
+ verifyFormat("message SomeMessage {\n"
" required int32 field1 = 1;\n"
" optional string field2 = 2 [default = \"2\"]\n"
"}");