16 #ifndef LLVM_CLANG_LIB_FORMAT_FORMATTOKENLEXER_H 17 #define LLVM_CLANG_LIB_FORMAT_FORMATTOKENLEXER_H 24 #include "llvm/Support/Regex.h" 47 void tryMergePreviousTokens();
49 bool tryMergeLessLess();
50 bool tryMergeNSStringLiteral();
63 void tryParseJSRegexLiteral();
74 void handleTemplateStrings();
76 void tryParsePythonComment();
78 bool tryMerge_TMacro();
80 bool tryMergeConflictMarkers();
88 std::stack<LexerState> StateStack;
90 unsigned TrailingWhitespace;
91 std::unique_ptr<Lexer> Lex;
98 llvm::SpecificBumpPtrAllocator<FormatToken> Allocator;
100 unsigned FirstInLineIndex;
104 bool FormattingDisabled;
106 llvm::Regex MacroBlockBeginRegex;
107 llvm::Regex MacroBlockEndRegex;
111 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.