]> granicus.if.org Git - clang/commit
clang-format: [JS] support free-standing functions again.
authorDaniel Jasper <djasper@google.com>
Mon, 30 Jun 2014 13:24:54 +0000 (13:24 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 30 Jun 2014 13:24:54 +0000 (13:24 +0000)
commit96ff76b6423d3b54829002e9d5cb8c17e4882dab
tree155c19596a082ebed3dbfbba81c22b926764324c
parent92b1476ea6c20682a5dc59bec72da06512bcd405
clang-format: [JS] support free-standing functions again.

This worked initially but was broken by r210887.

Before:
  function outer1(a, b) {
    function inner1(a, b) { return a; } inner1(a, b);
  } function outer2(a, b) { function inner2(a, b) { return a; } inner2(a, b); }

After:
  function outer1(a, b) {
    function inner1(a, b) { return a; }
    inner1(a, b);
  }
  function outer2(a, b) {
    function inner2(a, b) { return a; }
    inner2(a, b);
  }

Thanks to Adam Strzelecki for working on this.

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