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: http://llvm.org/svn/llvm-project/cfe/trunk@212038 91177308-0d34-0410-b5e6-96231b3b80d8
Fixing a few typos in the documentation.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@212039 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Improve expression heuristics.

Upon encountering a binary operator inside parentheses, assume that the
parentheses contain an expression.

Before:
  MACRO('0' <= c&& c <= '9');

After:
  MACRO('0' <= c && c <= '9');

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@212040 91177308-0d34-0410-b5e6-96231b3b80d8