16 #ifndef LLVM_CLANG_LIB_FORMAT_FORMATTOKENLEXER_H 17 #define LLVM_CLANG_LIB_FORMAT_FORMATTOKENLEXER_H 24 #include "llvm/Support/Regex.h" 25 #include "llvm/ADT/MapVector.h" 48 void tryMergePreviousTokens();
50 bool tryMergeLessLess();
51 bool tryMergeNSStringLiteral();
64 void tryParseJSRegexLiteral();
75 void handleTemplateStrings();
77 void tryParsePythonComment();
79 bool tryMerge_TMacro();
81 bool tryMergeConflictMarkers();
89 std::stack<LexerState> StateStack;
91 unsigned TrailingWhitespace;
92 std::unique_ptr<Lexer> Lex;
99 llvm::SpecificBumpPtrAllocator<FormatToken> Allocator;
101 unsigned FirstInLineIndex;
104 llvm::SmallMapVector<IdentifierInfo *, TokenType, 8> Macros;
106 bool FormattingDisabled;
108 llvm::Regex MacroBlockBeginRegex;
109 llvm::Regex MacroBlockEndRegex;
113 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.