[PATCH] D105087: [clang-format] PR49960 clang-format doesn't handle ASI after "return" on JavaScript
Martin Probst via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 29 11:27:02 PDT 2021
mprobst added inline comments.
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1015
+ if (!eof()) {
+ if (Next->is(tok::identifier)) {
+ // Peek the next token.
----------------
can you add comments explaining what syntax is being detected here?
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1019
+ FormatToken *NextNext = Tokens->getNextToken();
+ Tokens->setPosition(StoredPosition);
+ if (NextNext && NextNext->is(tok::equal))
----------------
parsePPEndIf uses a different method to peek - any opinion on why you're doing it differently here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105087/new/
https://reviews.llvm.org/D105087
More information about the cfe-commits
mailing list