[PATCH] D13211: clang-format: [JS] handle let (ES6).

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 06:23:13 PDT 2015


djasper accepted this revision.
This revision is now accepted and ready to land.

================
Comment at: lib/Format/TokenAnnotator.cpp:2087
@@ -2087,1 +2086,3 @@
+        // above.
+        !Line.startsWith(Keywords.kw_var) && !Line.startsWith(Keywords.kw_let))
       // Object literals on the top level of a file are treated as "enum-style".
----------------
Hm.. Or Line.First->isOneOf(Keywords.kw_var, KeyWords.kw_let).

I like that a bit better, but don't really care.


http://reviews.llvm.org/D13211





More information about the cfe-commits mailing list