This revision was automatically updated to reflect the committed changes.
mprobst marked an inline comment as done.
Closed by commit rL303106: clang-format: [JS] for async loops. (authored by
mprobst).
Changed prior to commit:
https://reviews.llvm.org/D33193?vs=98997&id=99048#toc
Repository:
mprobst marked an inline comment as done.
mprobst added inline comments.
Comment at: lib/Format/TokenAnnotator.cpp:583
Contexts.back().ColonIsForRangeExpr = true;
+ // for async ( ...
+ if (CurrentToken->is(Keywords.kw_async))
djasper wrote:
> Ca
mprobst updated this revision to Diff 98997.
mprobst marked an inline comment as done.
mprobst added a comment.
- make parsing JS specific
https://reviews.llvm.org/D33193
Files:
lib/Format/TokenAnnotator.cpp
lib/Format/UnwrappedLineParser.cpp
unittests/Format/FormatTestJS.cpp
Index: uni
djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/TokenAnnotator.cpp:583
Contexts.back().ColonIsForRangeExpr = true;
+ // for async ( ...
+ if (CurrentToken->is(Keywords.kw_async
mprobst created this revision.
Herald added a subscriber: klimek.
JavaScript supports asynchronous loop iteration in async functions:
for async (const x of y) ...
https://reviews.llvm.org/D33193
Files:
lib/Format/TokenAnnotator.cpp
lib/Format/UnwrappedLineParser.cpp
unittests/Format/Fo