]> granicus.if.org Git - clang/commit
clang-format: [JS] Understand object literals with only methods.
authorDaniel Jasper <djasper@google.com>
Sat, 4 Apr 2015 07:56:55 +0000 (07:56 +0000)
committerDaniel Jasper <djasper@google.com>
Sat, 4 Apr 2015 07:56:55 +0000 (07:56 +0000)
commit7295dfc056d5977d22e5d47615b25688341c36db
treecfcfadf2a4d89e8e5dcdf1a83e65886a5c80d58e
parent11f62e054bb7832c8a25be007119d47a98200b0d
clang-format: [JS] Understand object literals with only methods.

Before:
  let theObject = {someMethodName() {
    doTheThing();
    doTheOtherThing();
  },
                   someOtherMethodName() {
                     doSomething();
                     doSomethingElse();
                   }};

After:
  let theObject = {
    someMethodName() {
      doTheThing();
      doTheOtherThing();
    },
    someOtherMethodName() {
      doSomething();
      doSomethingElse();
    }
  };

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234091 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestJS.cpp