diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-02-11 12:38:04 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-02-11 12:38:11 +0000 |
commit | e3b557809604d036af6e00c60f012c2025b59a5e (patch) | |
tree | 8a11ba2269a3b669601e2fd41145b174008f4da8 /clang/lib/Format/FormatTokenLexer.h | |
parent | 08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 (diff) |
Diffstat (limited to 'clang/lib/Format/FormatTokenLexer.h')
-rw-r--r-- | clang/lib/Format/FormatTokenLexer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Format/FormatTokenLexer.h b/clang/lib/Format/FormatTokenLexer.h index bff2c181d81e..950305a37d68 100644 --- a/clang/lib/Format/FormatTokenLexer.h +++ b/clang/lib/Format/FormatTokenLexer.h @@ -60,7 +60,14 @@ private: bool tryMergeForEach(); bool tryTransformTryUsageForC(); + // Merge the most recently lexed tokens into a single token if their kinds are + // correct. bool tryMergeTokens(ArrayRef<tok::TokenKind> Kinds, TokenType NewType); + // Merge without checking their kinds. + bool tryMergeTokens(size_t Count, TokenType NewType); + // Merge if their kinds match any one of Kinds. + bool tryMergeTokensAny(ArrayRef<ArrayRef<tok::TokenKind>> Kinds, + TokenType NewType); // Returns \c true if \p Tok can only be followed by an operand in JavaScript. bool precedesOperand(FormatToken *Tok); |