[PATCH] D31698: clang-format: [JS] fix whitespace around "of" operator.

Daniel Jasper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 5 01:16:57 PDT 2017


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


================
Comment at: lib/Format/TokenAnnotator.cpp:2275
+                      tok::kw_const) ||
+         // "of" can only occur in a for loop, as a "const x of y".
+         (Left.is(Keywords.kw_of) && Left.Previous &&
----------------
Maybe:

  // "of" is only a keyword if it appears after another identifier
  // (e.g. as "const x of y" in a for loop).



https://reviews.llvm.org/D31698





More information about the cfe-commits mailing list