Lines Matching refs:Lexer
81 void Lexer::anchor() {} in anchor()
83 void Lexer::InitLexer(const char *BufStart, const char *BufPtr, in InitLexer()
139 Lexer::Lexer(FileID FID, const llvm::MemoryBufferRef &InputFile, in Lexer() function in Lexer
154 Lexer::Lexer(SourceLocation fileloc, const LangOptions &langOpts, in Lexer() function in Lexer
168 Lexer::Lexer(FileID FID, const llvm::MemoryBufferRef &FromFile, in Lexer() function in Lexer
171 : Lexer(SM.getLocForStartOfFile(FID), langOpts, FromFile.getBufferStart(), in Lexer()
175 void Lexer::resetExtendedTokenMode() { in resetExtendedTokenMode()
198 Lexer *Lexer::Create_PragmaLexer(SourceLocation SpellingLoc, in Create_PragmaLexer()
207 Lexer *L = new Lexer(SpellingFID, InputFile, PP); in Create_PragmaLexer()
233 void Lexer::seek(unsigned Offset, bool IsAtStartOfLine) { in seek()
265 std::string Lexer::Stringify(StringRef Str, bool Charify) { in Stringify()
272 void Lexer::Stringify(SmallVectorImpl<char> &Str) { StringifyImpl(Str, '"'); } in Stringify()
290 auto CharAndSize = Lexer::getCharAndSizeNoWarn(BufPtr, LangOpts); in getSpellingSlow()
319 auto CharAndSize = Lexer::getCharAndSizeNoWarn(BufPtr, LangOpts); in getSpellingSlow()
334 StringRef Lexer::getSpelling(SourceLocation loc, in getSpelling()
353 Lexer lexer(SM.getLocForStartOfFile(locInfo.first), options, in getSpelling()
375 std::string Lexer::getSpelling(const Token &Tok, const SourceManager &SourceMgr, in getSpelling()
407 unsigned Lexer::getSpelling(const Token &Tok, const char *&Buffer, in getSpelling()
454 unsigned Lexer::MeasureTokenLength(SourceLocation Loc, in MeasureTokenLength()
465 bool Lexer::getRawToken(SourceLocation Loc, Token &Result, in getRawToken()
490 Lexer TheLexer(SM.getLocForStartOfFile(LocInfo.first), LangOpts, in getRawToken()
507 !Lexer::isNewLineEscaped(BufStart, LexStart)) { in findBeginningOfLine()
538 Lexer TheLexer(LexerStartLoc, LangOpts, Buffer.data(), LexStart, in getBeginningOfFileToken()
564 SourceLocation Lexer::GetBeginningOfToken(SourceLocation Loc, in GetBeginningOfToken()
592 PreambleBounds Lexer::ComputePreamble(StringRef Buffer, in ComputePreamble()
600 Lexer TheLexer(FileLoc, LangOpts, Buffer.begin(), Buffer.begin(), in ComputePreamble()
746 unsigned Lexer::getTokenPrefixLength(SourceLocation TokStart, unsigned CharNo, in getTokenPrefixLength()
756 if (Invalid || (CharNo == 0 && Lexer::isObviouslySimpleCharacter(*TokPtr))) in getTokenPrefixLength()
764 while (Lexer::isObviouslySimpleCharacter(*TokPtr)) { in getTokenPrefixLength()
775 auto CharAndSize = Lexer::getCharAndSizeNoWarn(TokPtr, LangOpts); in getTokenPrefixLength()
784 if (!Lexer::isObviouslySimpleCharacter(*TokPtr)) in getTokenPrefixLength()
785 PhysOffset += Lexer::SkipEscapedNewLines(TokPtr)-TokPtr; in getTokenPrefixLength()
805 SourceLocation Lexer::getLocForEndOfToken(SourceLocation Loc, unsigned Offset, in getLocForEndOfToken()
816 unsigned Len = Lexer::MeasureTokenLength(Loc, SM, LangOpts); in getLocForEndOfToken()
827 bool Lexer::isAtStartOfMacroExpansion(SourceLocation loc, in isAtStartOfMacroExpansion()
849 bool Lexer::isAtEndOfMacroExpansion(SourceLocation loc, in isAtEndOfMacroExpansion()
882 End = Lexer::getLocForEndOfToken(End, 0, SM,LangOpts); in makeRangeFromFileLocs()
910 CharSourceRange Lexer::makeFileCharRange(CharSourceRange Range, in makeFileCharRange()
979 StringRef Lexer::getSourceText(CharSourceRange Range, in getSourceText()
1015 StringRef Lexer::getImmediateMacroName(SourceLocation Loc, in getImmediateMacroName()
1057 unsigned MacroTokenLength = Lexer::MeasureTokenLength(Loc, SM, LangOpts); in getImmediateMacroName()
1062 StringRef Lexer::getImmediateMacroNameForDiagnostics( in getImmediateMacroNameForDiagnostics()
1084 unsigned MacroTokenLength = Lexer::MeasureTokenLength(Loc, SM, LangOpts); in getImmediateMacroNameForDiagnostics()
1089 bool Lexer::isAsciiIdentifierContinueChar(char c, const LangOptions &LangOpts) { in isAsciiIdentifierContinueChar()
1093 bool Lexer::isNewLineEscaped(const char *BufferStart, const char *Str) { in isNewLineEscaped()
1113 StringRef Lexer::getIndentationForLine(SourceLocation Loc, in getIndentationForLine()
1168 SourceLocation Lexer::getSourceLocation(const char *Loc, in getSourceLocation()
1187 DiagnosticBuilder Lexer::Diag(const char *Loc, unsigned DiagID) const { in Diag()
1216 static char DecodeTrigraphChar(const char *CP, Lexer *L, bool Trigraphs) { in DecodeTrigraphChar()
1235 unsigned Lexer::getEscapedNewLineSize(const char *Ptr) { in getEscapedNewLineSize()
1258 const char *Lexer::SkipEscapedNewLines(const char *P) { in SkipEscapedNewLines()
1274 unsigned NewLineSize = Lexer::getEscapedNewLineSize(AfterEscape); in SkipEscapedNewLines()
1280 std::optional<Token> Lexer::findNextToken(SourceLocation Loc, in findNextToken()
1284 if (!Lexer::isAtEndOfMacroExpansion(Loc, SM, LangOpts, &Loc)) in findNextToken()
1287 Loc = Lexer::getLocForEndOfToken(Loc, 0, SM, LangOpts); in findNextToken()
1301 Lexer lexer(SM.getLocForStartOfFile(LocInfo.first), LangOpts, File.begin(), in findNextToken()
1313 SourceLocation Lexer::findLocationAfterToken( in findLocationAfterToken()
1359 Lexer::SizedChar Lexer::getCharAndSizeSlow(const char *Ptr, Token *Tok) { in getCharAndSizeSlow()
1420 Lexer::SizedChar Lexer::getCharAndSizeSlowNoWarn(const char *Ptr, in getCharAndSizeSlowNoWarn()
1470 void Lexer::SetByteOffset(unsigned Offset, bool StartOfLine) { in SetByteOffset()
1584 static inline CharSourceRange makeCharRange(Lexer &L, const char *Begin, in makeCharRange()
1721 bool Lexer::tryConsumeIdentifierUCN(const char *&CurPtr, unsigned Size, in tryConsumeIdentifierUCN()
1762 bool Lexer::tryConsumeIdentifierUTF8Char(const char *&CurPtr, Token &Result) { in tryConsumeIdentifierUTF8Char()
1813 bool Lexer::LexUnicodeIdentifierStart(Token &Result, uint32_t C, in LexUnicodeIdentifierStart()
1890 bool Lexer::LexIdentifierContinue(Token &Result, const char *CurPtr) { in LexIdentifierContinue()
1971 bool Lexer::isHexaLiteral(const char *Start, const LangOptions &LangOpts) { in isHexaLiteral()
1972 auto CharAndSize1 = Lexer::getCharAndSizeNoWarn(Start, LangOpts); in isHexaLiteral()
1978 Lexer::getCharAndSizeNoWarn(Start + CharAndSize1.Size, LangOpts); in isHexaLiteral()
1986 bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { in LexNumericConstant()
2054 const char *Lexer::LexUDSuffix(Token &Result, const char *CurPtr, in LexUDSuffix()
2146 bool Lexer::LexStringLiteral(Token &Result, const char *CurPtr, in LexStringLiteral()
2207 bool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, in LexRawStringLiteral()
2287 bool Lexer::LexAngledStringLiteral(Token &Result, const char *CurPtr) { in LexAngledStringLiteral()
2329 void Lexer::codeCompleteIncludedFile(const char *PathStart, in codeCompleteIncludedFile()
2364 bool Lexer::LexCharConstant(Token &Result, const char *CurPtr, in LexCharConstant()
2431 bool Lexer::SkipWhitespace(Token &Result, const char *CurPtr, in SkipWhitespace()
2507 bool Lexer::SkipLineComment(Token &Result, const char *CurPtr, in SkipLineComment()
2673 bool Lexer::SaveLineComment(Token &Result, const char *CurPtr) { in SaveLineComment()
2701 static bool isEndOfBlockCommentWithEscapedNewLine(const char *CurPtr, Lexer *L, in isEndOfBlockCommentWithEscapedNewLine()
2789 bool Lexer::SkipBlockComment(Token &Result, const char *CurPtr, in SkipBlockComment()
3009 void Lexer::ReadToEndOfLine(SmallVectorImpl<char> *Result) { in ReadToEndOfLine()
3065 bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { in LexEndOfFile()
3144 unsigned Lexer::isNextPPTokenLParen() { in isNextPPTokenLParen()
3208 bool Lexer::IsStartOfConflictMarker(const char *CurPtr) { in IsStartOfConflictMarker()
3252 bool Lexer::HandleEndOfConflictMarker(const char *CurPtr) { in HandleEndOfConflictMarker()
3301 bool Lexer::lexEditorPlaceholder(Token &Result, const char *CurPtr) { in lexEditorPlaceholder()
3320 bool Lexer::isCodeCompletionPoint(const char *CurPtr) const { in isCodeCompletionPoint()
3329 std::optional<uint32_t> Lexer::tryReadNumericUCN(const char *&StartPtr, in tryReadNumericUCN()
3443 std::optional<uint32_t> Lexer::tryReadNamedUCN(const char *&StartPtr, in tryReadNamedUCN()
3537 uint32_t Lexer::tryReadUCN(const char *&StartPtr, const char *SlashLoc, in tryReadUCN()
3602 bool Lexer::CheckUnicodeWhitespace(Token &Result, uint32_t C, in CheckUnicodeWhitespace()
3615 void Lexer::PropagateLineStartLeadingSpaceInfo(Token &Result) { in PropagateLineStartLeadingSpaceInfo()
3622 bool Lexer::Lex(Token &Result) { in Lex()
3659 bool Lexer::LexTokenInternal(Token &Result, bool TokAtPhysicalStartOfLine) { in LexTokenInternal()
4446 const char *Lexer::convertDependencyDirectiveToken( in convertDependencyDirectiveToken()
4458 bool Lexer::LexDependencyDirectiveToken(Token &Result) { in LexDependencyDirectiveToken()
4530 bool Lexer::LexDependencyDirectiveTokenWhileSkipping(Token &Result) { in LexDependencyDirectiveTokenWhileSkipping()