|
@@ -2701,12 +2701,12 @@ bool TokenAnnotator::canBreakBefore(const AnnotatedLine &Line,
|
|
|
} else if (Style.Language == FormatStyle::LK_JavaScript) {
|
|
|
const FormatToken *NonComment = Right.getPreviousNonComment();
|
|
|
if (NonComment &&
|
|
|
- NonComment->isOneOf(tok::kw_return, Keywords.kw_yield, tok::kw_continue,
|
|
|
- tok::kw_break, tok::kw_throw, Keywords.kw_interface,
|
|
|
- Keywords.kw_type, tok::kw_static, tok::kw_public,
|
|
|
- tok::kw_private, tok::kw_protected,
|
|
|
- Keywords.kw_readonly, Keywords.kw_abstract,
|
|
|
- Keywords.kw_get, Keywords.kw_set))
|
|
|
+ NonComment->isOneOf(
|
|
|
+ tok::kw_return, Keywords.kw_yield, tok::kw_continue, tok::kw_break,
|
|
|
+ tok::kw_throw, Keywords.kw_interface, Keywords.kw_type,
|
|
|
+ tok::kw_static, tok::kw_public, tok::kw_private, tok::kw_protected,
|
|
|
+ Keywords.kw_readonly, Keywords.kw_abstract, Keywords.kw_get,
|
|
|
+ Keywords.kw_set, Keywords.kw_async, Keywords.kw_await))
|
|
|
return false; // Otherwise automatic semicolon insertion would trigger.
|
|
|
if (Left.Tok.getIdentifierInfo() &&
|
|
|
Right.startsSequence(tok::l_square, tok::r_square))
|