]> granicus.if.org Git - clang/commit
clang-format: [JS/TS] Properly understand cast expressions.
authorDaniel Jasper <djasper@google.com>
Wed, 1 Mar 2017 19:26:12 +0000 (19:26 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 1 Mar 2017 19:26:12 +0000 (19:26 +0000)
commitebb54bf870a30aff0e47d852d1366c15a3b51ac6
tree4b78141be14804271cc3fcdbd16280f746076ad6
parentf24b23f5c27508ae5a5108baa6b94cf841c71441
clang-format: [JS/TS] Properly understand cast expressions.

Many things were wrong:
- We didn't always allow wrapping after "as", which can be necessary.
- We used to Undestand the identifier after "as" as a start of a name.
- We didn't properly parse the structure of the expression with "as"
  having the precedence of relational operators

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