MyDeveloperDay updated this revision to Diff 355848.
MyDeveloperDay marked 3 inline comments as done.
MyDeveloperDay set the repository for this revision to rG LLVM Github Monorepo.
MyDeveloperDay added a comment.
Updating based on revision comments, but found that the indentation can be
mprobst accepted this revision.
mprobst added inline comments.
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1001
+ if (TokenPosition < AllTokens.size()) {
+FormatToken *PeekNext = AllTokens[TokenPosition];
+return PeekNext;
nit: just `return
MyDeveloperDay marked 2 inline comments as done.
MyDeveloperDay added inline comments.
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1019
+FormatToken *NextNext = Tokens->getNextToken();
+Tokens->setPosition(StoredPosition);
+if (NextNext &&
MyDeveloperDay updated this revision to Diff 355817.
MyDeveloperDay added a comment.
Move Peek next token into a function, add a comment for clarity
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105087/new/
https://reviews.llvm.org/D105087
Files:
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?
HazardyKnusperkeks accepted this revision.
HazardyKnusperkeks added a comment.
This revision is now accepted and ready to land.
It's a strange language :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105087/new/
https://reviews.llvm.org/D105087
MyDeveloperDay created this revision.
MyDeveloperDay added reviewers: curdeius, HazardyKnusperkeks, mprobst.
MyDeveloperDay added projects: clang, clang-format.
MyDeveloperDay requested review of this revision.
https://bugs.llvm.org/show_bug.cgi?id=49960
clang-format can mutate legal javascript