This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] fix incorrectly collapsed lines after export statement.
ClosedPublic

Authored by mprobst on Jun 11 2015, 9:34 PM.

Details

Reviewers
djasper
Summary

When an exported function would follow a class declaration, it would not be recognized as a stand-alone function. That would then collapse the following line with the current one, e.g.

class C {}
export function f() {} var x;

This change recognizes functions as free standing even when the line starts with an export keyword.

Diff Detail

Event Timeline

mprobst updated this revision to Diff 27562.Jun 11 2015, 9:34 PM
mprobst updated this revision to Diff 27563.
mprobst retitled this revision from to clang-format: [JS] fix incorrectly collapsed lines after export statement..
mprobst updated this object.
mprobst edited the test plan for this revision. (Show Details)
mprobst added a reviewer: djasper.
mprobst added subscribers: Unknown Object (MLST), klimek.

kw_import is unneeded, there is no "import function ..." statement.

djasper accepted this revision.Jun 11 2015, 10:04 PM
djasper edited edge metadata.

Fixed with a different fix in r239592.

This revision is now accepted and ready to land.Jun 11 2015, 10:04 PM
djasper closed this revision.Jun 11 2015, 10:04 PM