[PATCH] clang-format: [JS] Better support for fat arrows.

Martin Probst martinprobst at google.com
Thu May 21 04:35:33 PDT 2015


Hi klimek,

Assigns a token type (TT_JsFatArrow) to => tokens, and uses that to
more easily recognize and format fat arrow functions.
Improves function parsing to better recognize formal parameter
lists and return type declarations.
Recognizes arrow functions and parse function bodies as child blocks.

http://reviews.llvm.org/D9906

Files:
  lib/Format/Format.cpp
  lib/Format/FormatToken.h
  lib/Format/UnwrappedLineParser.cpp
  lib/Format/UnwrappedLineParser.h
  unittests/Format/FormatTestJS.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9906.26216.patch
Type: text/x-patch
Size: 7926 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150521/b8115b01/attachment.bin>


More information about the cfe-commits mailing list