[clalng-format] Fix handling of TypeScript tuples with optional last member
authorTaymon A. Beal <taymon@google.com>
Tue, 21 Feb 2023 10:47:36 +0000 (02:47 -0800)
committerOwen Pan <owenpiano@gmail.com>
Tue, 21 Feb 2023 10:51:56 +0000 (02:51 -0800)
commit801bd3265362389a7125051128fdd3e6e85cc37b
tree5e6dc225e1e52db6a2939287179a7b7547137cbd
parent38d0e4d180139b0f96ad0b9ced19239dd603df1d
[clalng-format] Fix handling of TypeScript tuples with optional last member

These were previously incorrectly treated as syntax errors.

Differential Revision: https://reviews.llvm.org/D144317
clang/lib/Format/TokenAnnotator.cpp
clang/unittests/Format/FormatTestJS.cpp