clang-format: [JS] Let fat arrows have 'Assignment' precedence.
authorDaniel Jasper <djasper@google.com>
Fri, 5 Jun 2015 08:25:37 +0000 (08:25 +0000)
committerDaniel Jasper <djasper@google.com>
Fri, 5 Jun 2015 08:25:37 +0000 (08:25 +0000)
commit3b0f304517fa4cd28fe2bb7440004a180557330c
tree5edd3908374f32bc177b0154178bc9cefffd133c
parentb4c562de87e71493fd26cdd30b5851f15d2285cb
clang-format: [JS] Let fat arrows have 'Assignment' precedence.

This is a more correct representation than using "Equality" introduced
in r238942 which was a quick fix to solve an actual regression.

According to the typescript spec, arrows behave like "low-precedence"
assignments.

Before:
  var a = a.aaaaaaa((a: a) => aaaaaaaaaaaaaaaaaaaaa(bbbbbbbbb) &&
                    aaaaaaaaaaaaaaaaaaaaa(bbbbbbb));
After:
  var a = a.aaaaaaa((a: a) => aaaaaaaaaaaaaaaaaaaaa(bbbbbbbbb) &&
                              aaaaaaaaaaaaaaaaaaaaa(bbbbbbb));

llvm-svn: 239137
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTestJS.cpp