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)) ---------------- Can we make this JS specific, e.g. by turning l. 579 into: if (Style.Language == FormatStyle::LK_JavaScript) { if (Tok->Previous && Tok->Previous->is(tok::period)) break; if (CurrentToken->is(Keywords.kw_async)) next(); } Alternatively, leave a comment that this is JavaScript's "async" ================ Comment at: lib/Format/UnwrappedLineParser.cpp:1638 nextToken(); + if (FormatTok->is(Keywords.kw_async)) + nextToken(); ---------------- Same here.. Make this JS specific or at least leave a comment. https://reviews.llvm.org/D33193 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits