16 #ifndef LLVM_CLANG_LIB_FORMAT_FORMATTOKENLEXER_H
17 #define LLVM_CLANG_LIB_FORMAT_FORMATTOKENLEXER_H
24 #include "llvm/Support/Regex.h"
39 void tryMergePreviousTokens();
41 bool tryMergeLessLess();
54 void tryParseJSRegexLiteral();
56 void tryParseTemplateString();
58 bool tryMerge_TMacro();
60 bool tryMergeConflictMarkers();
68 bool GreaterStashed, LessStashed;
70 unsigned TrailingWhitespace;
71 std::unique_ptr<Lexer> Lex;
78 llvm::SpecificBumpPtrAllocator<FormatToken> Allocator;
80 unsigned FirstInLineIndex;
84 bool FormattingDisabled;
86 llvm::Regex MacroBlockBeginRegex;
87 llvm::Regex MacroBlockEndRegex;
91 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...
Defines the clang::SourceLocation class and associated facilities.
This class handles loading and caching of source files into memory.