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();
56 bool tryTransformCSharpForEach();
69 void tryParseJSRegexLiteral();
80 void handleTemplateStrings();
82 void tryParsePythonComment();
84 bool tryMerge_TMacro();
86 bool tryMergeConflictMarkers();
94 std::stack<LexerState> StateStack;
96 unsigned TrailingWhitespace;
97 std::unique_ptr<Lexer> Lex;
104 llvm::SpecificBumpPtrAllocator<FormatToken> Allocator;
106 unsigned FirstInLineIndex;
109 llvm::SmallMapVector<IdentifierInfo *, TokenType, 8> Macros;
111 bool FormattingDisabled;
113 llvm::Regex MacroBlockBeginRegex;
114 llvm::Regex MacroBlockEndRegex;
118 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.