15 #ifndef LLVM_CLANG_LIB_FORMAT_FORMATTOKENLEXER_H 16 #define LLVM_CLANG_LIB_FORMAT_FORMATTOKENLEXER_H 23 #include "llvm/ADT/MapVector.h" 24 #include "llvm/Support/Regex.h" 47 void tryMergePreviousTokens();
49 bool tryMergeLessLess();
50 bool tryMergeNSStringLiteral();
51 bool tryMergeJSPrivateIdentifier();
52 bool tryMergeCSharpVerbatimStringLiteral();
53 bool tryMergeCSharpKeywordVariables();
54 bool tryMergeCSharpNullConditionals();
55 bool tryMergeCSharpDoubleQuestion();
68 void tryParseJSRegexLiteral();
79 void handleTemplateStrings();
81 void tryParsePythonComment();
83 bool tryMerge_TMacro();
85 bool tryMergeConflictMarkers();
93 std::stack<LexerState> StateStack;
95 unsigned TrailingWhitespace;
96 std::unique_ptr<Lexer> Lex;
103 llvm::SpecificBumpPtrAllocator<FormatToken> Allocator;
105 unsigned FirstInLineIndex;
108 llvm::SmallMapVector<IdentifierInfo *, TokenType, 8> Macros;
110 bool FormattingDisabled;
112 llvm::Regex MacroBlockBeginRegex;
113 llvm::Regex MacroBlockEndRegex;
117 void resetLexer(
unsigned Offset);
Defines the SourceManager interface.
Contains functions for text encoding manipulation.
Implements an efficient mapping from strings to IdentifierInfo nodes.
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Dataflow Directional Tag Classes.
Defines the clang::SourceLocation class and associated facilities.
This class handles loading and caching of source files into memory.