]> granicus.if.org Git - clang/commit
clang-format: [JS] support closures in container literals.
authorDaniel Jasper <djasper@google.com>
Thu, 8 May 2014 09:25:39 +0000 (09:25 +0000)
committerDaniel Jasper <djasper@google.com>
Thu, 8 May 2014 09:25:39 +0000 (09:25 +0000)
commita16d0b2f6727377e6d36cd4ca146b630b421c6e5
tree9030a61ce1d084bfc5ec2b182987bfe50a12f504
parent26368c6ccd4d2f4b8d4b3bdd5f412338d22b3a28
clang-format: [JS] support closures in container literals.

Before:
  return {body: {setAttribute: function(key, val) {this[key] = val;
  }
  , getAttribute : function(key) { return this[key]; }
  , style : {
  direction:
    ''
  }
  }
  }
  ;

After:
  return {
    body: {
      setAttribute: function(key, val) { this[key] = val; },
      getAttribute: function(key) { return this[key]; },
      style: {direction: ''}
    }
  };

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