forked from OSchip/llvm-project
parent
531063b274
commit
40432cee93
|
@ -280,8 +280,8 @@ private:
|
|||
Parent->isOneOf(tok::l_brace, tok::comma)) {
|
||||
Left->Type = TT_JsComputedPropertyName;
|
||||
} else if (Parent &&
|
||||
Parent->isOneOf(tok::at, tok::equal, tok::comma,
|
||||
tok::l_paren, tok::question, tok::colon)) {
|
||||
Parent->isOneOf(tok::at, tok::equal, tok::comma, tok::l_paren,
|
||||
tok::l_square, tok::question, tok::colon)) {
|
||||
Left->Type = TT_ArrayInitializerLSquare;
|
||||
} else {
|
||||
BindingIncrease = 10;
|
||||
|
|
|
@ -257,6 +257,9 @@ TEST_F(FormatTestJS, ArrayLiterals) {
|
|||
" bbbbbbbbbbbbbbbbbbbbbbbbbbb,\n"
|
||||
" ccccccccccccccccccccccccccc\n"
|
||||
"]);");
|
||||
verifyFormat("var someVariable = SomeFuntion([\n"
|
||||
" [aaaaaaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbbbb],\n"
|
||||
"]);");
|
||||
verifyFormat("var someVariable = SomeFuntion(aaaa, [\n"
|
||||
" aaaaaaaaaaaaaaaaaaaaaaaaaaa,\n"
|
||||
" bbbbbbbbbbbbbbbbbbbbbbbbbbb,\n"
|
||||
|
|
Loading…
Reference in New Issue