clang-format: [JS] Teach clang-format about "export interface".

llvm-svn: 257406
This commit is contained in:
Daniel Jasper 2016-01-11 22:57:40 +00:00
parent baa07490bc
commit f55e418247
2 changed files with 6 additions and 1 deletions

View File

@ -1810,7 +1810,8 @@ void UnwrappedLineParser::parseJavaScriptEs6ImportExport() {
}
if (FormatTok->isOneOf(tok::kw_const, tok::kw_class, tok::kw_enum,
Keywords.kw_let, Keywords.kw_var))
Keywords.kw_interface, Keywords.kw_let,
Keywords.kw_var))
return; // Fall through to parsing the corresponding structure.
while (!eof() && FormatTok->isNot(tok::semi)) {

View File

@ -900,6 +900,10 @@ TEST_F(FormatTestJS, Modules) {
"];");
verifyFormat("export default [];");
verifyFormat("export default () => {};");
verifyFormat("export interface Foo { foo: number; }\n"
"export class Bar {\n"
" blah(): string { return this.blah; };\n"
"}");
}
TEST_F(FormatTestJS, TemplateStrings) {