Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Format/UnwrappedLineParser.cpp
Show First 20 Lines • Show All 2,210 Lines • ▼ Show 20 Lines | assert(FormatTok->isOneOf(tok::kw_namespace, TT_NamespaceMacro) && | ||||
"'namespace' expected"); | "'namespace' expected"); | ||||
const FormatToken &InitialToken = *FormatTok; | const FormatToken &InitialToken = *FormatTok; | ||||
nextToken(); | nextToken(); | ||||
if (InitialToken.is(TT_NamespaceMacro)) { | if (InitialToken.is(TT_NamespaceMacro)) { | ||||
parseParens(); | parseParens(); | ||||
} else { | } else { | ||||
while (FormatTok->isOneOf(tok::identifier, tok::coloncolon, tok::kw_inline, | while (FormatTok->isOneOf(tok::identifier, tok::coloncolon, tok::kw_inline, | ||||
tok::l_square)) { | tok::l_square, tok::period)) { | ||||
if (FormatTok->is(tok::l_square)) | if (FormatTok->is(tok::l_square)) | ||||
parseSquare(); | parseSquare(); | ||||
else | else | ||||
nextToken(); | nextToken(); | ||||
} | } | ||||
} | } | ||||
if (FormatTok->Tok.is(tok::l_brace)) { | if (FormatTok->Tok.is(tok::l_brace)) { | ||||
if (ShouldBreakBeforeBrace(Style, InitialToken)) | if (ShouldBreakBeforeBrace(Style, InitialToken)) | ||||
▲ Show 20 Lines • Show All 1,139 Lines • Show Last 20 Lines |