Lines Matching refs:Lexer

77 void Lexer::anchor() {}  in anchor()
79 void Lexer::InitLexer(const char *BufStart, const char *BufPtr, in InitLexer()
135 Lexer::Lexer(FileID FID, const llvm::MemoryBufferRef &InputFile, in Lexer() function in Lexer
149 Lexer::Lexer(SourceLocation fileloc, const LangOptions &langOpts, in Lexer() function in Lexer
161 Lexer::Lexer(FileID FID, const llvm::MemoryBufferRef &FromFile, in Lexer() function in Lexer
163 : Lexer(SM.getLocForStartOfFile(FID), langOpts, FromFile.getBufferStart(), in Lexer()
166 void Lexer::resetExtendedTokenMode() { in resetExtendedTokenMode()
189 Lexer *Lexer::Create_PragmaLexer(SourceLocation SpellingLoc, in Create_PragmaLexer()
198 Lexer *L = new Lexer(SpellingFID, InputFile, PP); in Create_PragmaLexer()
224 bool Lexer::skipOver(unsigned NumBytes) { in skipOver()
258 std::string Lexer::Stringify(StringRef Str, bool Charify) { in Stringify()
265 void Lexer::Stringify(SmallVectorImpl<char> &Str) { StringifyImpl(Str, '"'); } in Stringify()
284 Spelling[Length++] = Lexer::getCharAndSizeNoWarn(BufPtr, Size, LangOpts); in getSpellingSlow()
313 Spelling[Length++] = Lexer::getCharAndSizeNoWarn(BufPtr, Size, LangOpts); in getSpellingSlow()
327 StringRef Lexer::getSpelling(SourceLocation loc, in getSpelling()
346 Lexer lexer(SM.getLocForStartOfFile(locInfo.first), options, in getSpelling()
368 std::string Lexer::getSpelling(const Token &Tok, const SourceManager &SourceMgr, in getSpelling()
400 unsigned Lexer::getSpelling(const Token &Tok, const char *&Buffer, in getSpelling()
447 unsigned Lexer::MeasureTokenLength(SourceLocation Loc, in MeasureTokenLength()
458 bool Lexer::getRawToken(SourceLocation Loc, Token &Result, in getRawToken()
483 Lexer TheLexer(SM.getLocForStartOfFile(LocInfo.first), LangOpts, in getRawToken()
500 !Lexer::isNewLineEscaped(BufStart, LexStart)) { in findBeginningOfLine()
531 Lexer TheLexer(LexerStartLoc, LangOpts, Buffer.data(), LexStart, in getBeginningOfFileToken()
557 SourceLocation Lexer::GetBeginningOfToken(SourceLocation Loc, in GetBeginningOfToken()
585 PreambleBounds Lexer::ComputePreamble(StringRef Buffer, in ComputePreamble()
593 Lexer TheLexer(FileLoc, LangOpts, Buffer.begin(), Buffer.begin(), in ComputePreamble()
721 unsigned Lexer::getTokenPrefixLength(SourceLocation TokStart, unsigned CharNo, in getTokenPrefixLength()
731 if (Invalid || (CharNo == 0 && Lexer::isObviouslySimpleCharacter(*TokPtr))) in getTokenPrefixLength()
739 while (Lexer::isObviouslySimpleCharacter(*TokPtr)) { in getTokenPrefixLength()
751 Lexer::getCharAndSizeNoWarn(TokPtr, Size, LangOpts); in getTokenPrefixLength()
760 if (!Lexer::isObviouslySimpleCharacter(*TokPtr)) in getTokenPrefixLength()
761 PhysOffset += Lexer::SkipEscapedNewLines(TokPtr)-TokPtr; in getTokenPrefixLength()
781 SourceLocation Lexer::getLocForEndOfToken(SourceLocation Loc, unsigned Offset, in getLocForEndOfToken()
792 unsigned Len = Lexer::MeasureTokenLength(Loc, SM, LangOpts); in getLocForEndOfToken()
803 bool Lexer::isAtStartOfMacroExpansion(SourceLocation loc, in isAtStartOfMacroExpansion()
825 bool Lexer::isAtEndOfMacroExpansion(SourceLocation loc, in isAtEndOfMacroExpansion()
858 End = Lexer::getLocForEndOfToken(End, 0, SM,LangOpts); in makeRangeFromFileLocs()
878 CharSourceRange Lexer::makeFileCharRange(CharSourceRange Range, in makeFileCharRange()
942 StringRef Lexer::getSourceText(CharSourceRange Range, in getSourceText()
978 StringRef Lexer::getImmediateMacroName(SourceLocation Loc, in getImmediateMacroName()
1020 unsigned MacroTokenLength = Lexer::MeasureTokenLength(Loc, SM, LangOpts); in getImmediateMacroName()
1025 StringRef Lexer::getImmediateMacroNameForDiagnostics( in getImmediateMacroNameForDiagnostics()
1045 unsigned MacroTokenLength = Lexer::MeasureTokenLength(Loc, SM, LangOpts); in getImmediateMacroNameForDiagnostics()
1050 bool Lexer::isIdentifierBodyChar(char c, const LangOptions &LangOpts) { in isIdentifierBodyChar()
1054 bool Lexer::isNewLineEscaped(const char *BufferStart, const char *Str) { in isNewLineEscaped()
1074 StringRef Lexer::getIndentationForLine(SourceLocation Loc, in getIndentationForLine()
1129 SourceLocation Lexer::getSourceLocation(const char *Loc, in getSourceLocation()
1148 DiagnosticBuilder Lexer::Diag(const char *Loc, unsigned DiagID) const { in Diag()
1177 static char DecodeTrigraphChar(const char *CP, Lexer *L) { in DecodeTrigraphChar()
1195 unsigned Lexer::getEscapedNewLineSize(const char *Ptr) { in getEscapedNewLineSize()
1218 const char *Lexer::SkipEscapedNewLines(const char *P) { in SkipEscapedNewLines()
1234 unsigned NewLineSize = Lexer::getEscapedNewLineSize(AfterEscape); in SkipEscapedNewLines()
1240 Optional<Token> Lexer::findNextToken(SourceLocation Loc, in findNextToken()
1244 if (!Lexer::isAtEndOfMacroExpansion(Loc, SM, LangOpts, &Loc)) in findNextToken()
1247 Loc = Lexer::getLocForEndOfToken(Loc, 0, SM, LangOpts); in findNextToken()
1261 Lexer lexer(SM.getLocForStartOfFile(LocInfo.first), LangOpts, File.begin(), in findNextToken()
1273 SourceLocation Lexer::findLocationAfterToken( in findLocationAfterToken()
1319 char Lexer::getCharAndSizeSlow(const char *Ptr, unsigned &Size, in getCharAndSizeSlow()
1377 char Lexer::getCharAndSizeSlowNoWarn(const char *Ptr, unsigned &Size, in getCharAndSizeSlowNoWarn()
1423 void Lexer::SetByteOffset(unsigned Offset, bool StartOfLine) { in SetByteOffset()
1471 static inline CharSourceRange makeCharRange(Lexer &L, const char *Begin, in makeCharRange()
1596 bool Lexer::tryConsumeIdentifierUCN(const char *&CurPtr, unsigned Size, in tryConsumeIdentifierUCN()
1618 bool Lexer::tryConsumeIdentifierUTF8Char(const char *&CurPtr) { in tryConsumeIdentifierUTF8Char()
1642 bool Lexer::LexIdentifier(Token &Result, const char *CurPtr) { in LexIdentifier()
1743 bool Lexer::isHexaLiteral(const char *Start, const LangOptions &LangOpts) { in isHexaLiteral()
1745 char C1 = Lexer::getCharAndSizeNoWarn(Start, Size, LangOpts); in isHexaLiteral()
1748 char C2 = Lexer::getCharAndSizeNoWarn(Start + Size, Size, LangOpts); in isHexaLiteral()
1755 bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { in LexNumericConstant()
1820 const char *Lexer::LexUDSuffix(Token &Result, const char *CurPtr, in LexUDSuffix()
1911 bool Lexer::LexStringLiteral(Token &Result, const char *CurPtr, in LexStringLiteral()
1973 bool Lexer::LexRawStringLiteral(Token &Result, const char *CurPtr, in LexRawStringLiteral()
2053 bool Lexer::LexAngledStringLiteral(Token &Result, const char *CurPtr) { in LexAngledStringLiteral()
2095 void Lexer::codeCompleteIncludedFile(const char *PathStart, in codeCompleteIncludedFile()
2130 bool Lexer::LexCharConstant(Token &Result, const char *CurPtr, in LexCharConstant()
2197 bool Lexer::SkipWhitespace(Token &Result, const char *CurPtr, in SkipWhitespace()
2273 bool Lexer::SkipLineComment(Token &Result, const char *CurPtr, in SkipLineComment()
2414 bool Lexer::SaveLineComment(Token &Result, const char *CurPtr) { in SaveLineComment()
2443 Lexer *L) { in isEndOfBlockCommentWithEscapedNewLine()
2516 bool Lexer::SkipBlockComment(Token &Result, const char *CurPtr, in SkipBlockComment()
2684 void Lexer::ReadToEndOfLine(SmallVectorImpl<char> *Result) { in ReadToEndOfLine()
2740 bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { in LexEndOfFile()
2814 unsigned Lexer::isNextPPTokenLParen() { in isNextPPTokenLParen()
2871 bool Lexer::IsStartOfConflictMarker(const char *CurPtr) { in IsStartOfConflictMarker()
2915 bool Lexer::HandleEndOfConflictMarker(const char *CurPtr) { in HandleEndOfConflictMarker()
2964 bool Lexer::lexEditorPlaceholder(Token &Result, const char *CurPtr) { in lexEditorPlaceholder()
2983 bool Lexer::isCodeCompletionPoint(const char *CurPtr) const { in isCodeCompletionPoint()
2992 uint32_t Lexer::tryReadUCN(const char *&StartPtr, const char *SlashLoc, in tryReadUCN()
3103 bool Lexer::CheckUnicodeWhitespace(Token &Result, uint32_t C, in CheckUnicodeWhitespace()
3118 bool Lexer::LexUnicode(Token &Result, uint32_t C, const char *CurPtr) { in LexUnicode()
3159 void Lexer::PropagateLineStartLeadingSpaceInfo(Token &Result) { in PropagateLineStartLeadingSpaceInfo()
3166 bool Lexer::Lex(Token &Result) { in Lex()
3201 bool Lexer::LexTokenInternal(Token &Result, bool TokAtPhysicalStartOfLine) { in LexTokenInternal()