This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] handle parenthesized class expressions.
ClosedPublic

Authored by mprobst on Feb 7 2017, 5:49 AM.

Details

Summary

In JavaScript, classes are expressions, so they can appear e.g. in
argument lists.

var C = foo(class {
  bar() {
    return 1;
  }
};

Diff Detail

Repository
rL LLVM

Event Timeline

mprobst created this revision.Feb 7 2017, 5:49 AM
djasper accepted this revision.Feb 7 2017, 5:55 AM

Thanks

This revision is now accepted and ready to land.Feb 7 2017, 5:55 AM
mprobst updated this revision to Diff 87412.Feb 7 2017, 6:10 AM
  • Parse nested classes as child expressions.

Sorry.. Should have caught this in the initial review. Still looks good.

This revision was automatically updated to reflect the committed changes.