Page MenuHomePhabricator

clang-format: [JS] handle destructuring `of`.
ClosedPublic

Authored by mprobst on Nov 24 2017, 2:38 AM.

Details

Summary

Previously, clang-format would drop a space character between of and
then following (non-identifier) token if the preceding token was part of
a destructuring assignment (} or ]).

Before:

for (const [a, b] of[]) {}

After:

for (const [a, b] of []) {}

Diff Detail

Repository
rL LLVM

Event Timeline

mprobst created this revision.Nov 24 2017, 2:38 AM
djasper accepted this revision.Nov 24 2017, 2:47 AM

Looks good.

This revision is now accepted and ready to land.Nov 24 2017, 2:47 AM
This revision was automatically updated to reflect the committed changes.