39 llvm::SpecificBumpPtrAllocator<FormatToken> &Allocator,
47 void tryMergePreviousTokens();
49 bool tryMergeLessLess();
50 bool tryMergeGreaterGreater();
51 bool tryMergeUserDefinedLiteral();
52 bool tryMergeNSStringLiteral();
53 bool tryMergeJSPrivateIdentifier();
54 bool tryMergeCSharpStringLiteral();
55 bool tryMergeCSharpUtf8StringLiteral();
56 bool tryMergeCSharpKeywordVariables();
57 bool tryMergeNullishCoalescingEqual();
58 bool tryTransformCSharpForEach();
59 bool tryMergeForEach();
65 bool tryMergeTokens(
size_t Count,
TokenType NewType);
75 void tryParseJavaTextBlock();
81 void tryParseJSRegexLiteral();
92 void handleTemplateStrings();
94 void handleCSharpVerbatimAndInterpolatedStrings();
97 void handleTableGenMultilineString();
101 void handleTableGenNumericLikeIdentifier();
103 void tryParsePythonComment();
105 bool tryMerge_TMacro();
107 bool tryMergeConflictMarkers();
109 void truncateToken(
size_t NewLen);
117 std::stack<LexerState> StateStack;
119 unsigned TrailingWhitespace;
120 std::unique_ptr<Lexer> Lex;
128 llvm::SpecificBumpPtrAllocator<FormatToken> &Allocator;
130 unsigned FirstInLineIndex;
133 llvm::SmallMapVector<IdentifierInfo *, TokenType, 8> Macros;
136 TemplateNames, TypeNames, VariableTemplates;
138 bool FormattingDisabled;
140 llvm::Regex MacroBlockBeginRegex;
141 llvm::Regex MacroBlockEndRegex;
145 bool VerilogProtectedBlock;
148 static const llvm::StringSet<> CSharpAttributeTargets;
157 void resetLexer(
unsigned Offset);