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 bool tryMerge_TMacro();
78 bool tryMergeConflictMarkers();
86 std::stack<LexerState> StateStack;
88 unsigned TrailingWhitespace;
89 std::unique_ptr<Lexer> Lex;
96 llvm::SpecificBumpPtrAllocator<FormatToken> Allocator;
98 unsigned FirstInLineIndex;
102 bool FormattingDisabled;
104 llvm::Regex MacroBlockBeginRegex;
105 llvm::Regex MacroBlockEndRegex;
109 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.