Summary:
Before:
x!as string
After:
x! as string
Reviewers: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D24272
llvm-svn: 280731
tok::r_square, tok::r_brace) ||
Left.Tok.isLiteral()))
return false;
+ if (Left.is(tok::exclaim) && Right.is(Keywords.kw_as))
+ return true; // "x! as string"
} else if (Style.Language == FormatStyle::LK_Java) {
if (Left.is(tok::r_square) && Right.is(tok::l_brace))
return true;
verifyFormat("x = x as [a, b];");
verifyFormat("x = x as {a: string};");
verifyFormat("x = x as (string);");
+ verifyFormat("x = x! as (string);");
}
TEST_F(FormatTestJS, TypeArguments) {