This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] simplify import/export.
ClosedPublic

Authored by mprobst on Apr 18 2016, 3:16 PM.

Details

Summary

Change import and export parsing to special case the renaming
syntax (import x, {y as bar} ..., export {x}) and otherwise just
parse a regular structural element.

This simplifies the code a bit and should be more correct - it's easier
to recognise the specific import syntax than to recognise arbitrary
expressions and declarations.

Diff Detail

Repository
rL LLVM

Event Timeline

mprobst updated this revision to Diff 54124.Apr 18 2016, 3:16 PM
mprobst retitled this revision from to clang-format: [JS] simplify import/export..
mprobst updated this object.
mprobst added a reviewer: djasper.
mprobst added a subscriber: cfe-commits.
djasper accepted this revision.Apr 19 2016, 5:27 AM
djasper edited edge metadata.

Looks good.

lib/Format/UnwrappedLineParser.cpp
1900 ↗(On Diff #54124)

nit: Change parenthesis to comma or close it.

This revision is now accepted and ready to land.Apr 19 2016, 5:27 AM
This revision was automatically updated to reflect the committed changes.
mprobst marked an inline comment as done.Apr 19 2016, 8:02 AM