Patch by Martin Probst. Thank you.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234752
91177308-0d34-0410-b5e6-
96231b3b80d8
// it is often token-pasted.
while (FormatTok->is(tok::identifier) || FormatTok->is(tok::coloncolon) ||
FormatTok->is(tok::hashhash) ||
- (Style.Language == FormatStyle::LK_Java &&
+ ((Style.Language == FormatStyle::LK_Java ||
+ Style.Language == FormatStyle::LK_JavaScript) &&
FormatTok->isOneOf(tok::period, tok::comma)))
nextToken();
verifyFormat("class C {\n private static x: string = 12;\n}");
verifyFormat("class C {\n static x(): string { return 'asd'; }\n}");
verifyFormat("class C extends P implements I {}");
+ verifyFormat("class C extends p.P implements i.I {}");
}
TEST_F(FormatTestJS, MetadataAnnotations) {