forked from OSchip/llvm-project
clang-format: [JS] Teach clang-format about "export interface".
llvm-svn: 257406
This commit is contained in:
parent
baa07490bc
commit
f55e418247
|
@ -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)) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue