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: > 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" My reasoning was that this would at best be a syntax error in other languages, so it's fine to parse. But changed to be JS specific, that might be cleaner. https://reviews.llvm.org/D33193 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits