Lines Matching refs:FormatTok
600 : FormatTok(nullptr), IsFirstToken(true), GreaterStashed(false), in FormatTokenLexer()
954 Token Tok = FormatTok->Tok; in getStashedToken()
955 StringRef TokenText = FormatTok->TokenText; in getStashedToken()
957 unsigned OriginalColumn = FormatTok->OriginalColumn; in getStashedToken()
958 FormatTok = new (Allocator.Allocate()) FormatToken; in getStashedToken()
959 FormatTok->Tok = Tok; in getStashedToken()
961 FormatTok->Tok.getLocation().getLocWithOffset(Tok.getLength() - 1); in getStashedToken()
962 FormatTok->Tok.setLocation(TokLocation); in getStashedToken()
963 FormatTok->WhitespaceRange = SourceRange(TokLocation, TokLocation); in getStashedToken()
964 FormatTok->TokenText = TokenText; in getStashedToken()
965 FormatTok->ColumnWidth = 1; in getStashedToken()
966 FormatTok->OriginalColumn = OriginalColumn + 1; in getStashedToken()
968 return FormatTok; in getStashedToken()
981 FormatTok = new (Allocator.Allocate()) FormatToken; in getNextToken()
982 readRawToken(*FormatTok); in getNextToken()
984 FormatTok->Tok.getLocation().getLocWithOffset(-TrailingWhitespace); in getNextToken()
985 FormatTok->IsFirst = IsFirstToken; in getNextToken()
990 while (FormatTok->Tok.is(tok::unknown)) { in getNextToken()
993 for (int i = 0, e = FormatTok->TokenText.size(); i != e; ++i) { in getNextToken()
994 switch (FormatTok->TokenText[i]) { in getNextToken()
996 ++FormatTok->NewlinesBefore; in getNextToken()
999 if (i == 0 || (FormatTok->TokenText[i - 1] != '\\' && in getNextToken()
1000 (FormatTok->TokenText[i - 1] != '\r' || i == 1 || in getNextToken()
1001 FormatTok->TokenText[i - 2] != '\\'))) in getNextToken()
1002 FormatTok->HasUnescapedNewline = true; in getNextToken()
1003 FormatTok->LastNewlineOffset = WhitespaceLength + i + 1; in getNextToken()
1007 FormatTok->LastNewlineOffset = WhitespaceLength + i + 1; in getNextToken()
1021 if (i + 1 == e || (FormatTok->TokenText[i + 1] != '\r' && in getNextToken()
1022 FormatTok->TokenText[i + 1] != '\n')) in getNextToken()
1023 FormatTok->Type = TT_ImplicitStringLiteral; in getNextToken()
1026 FormatTok->Type = TT_ImplicitStringLiteral; in getNextToken()
1032 if (FormatTok->is(TT_ImplicitStringLiteral)) in getNextToken()
1034 WhitespaceLength += FormatTok->Tok.getLength(); in getNextToken()
1036 readRawToken(*FormatTok); in getNextToken()
1043 while (FormatTok->TokenText.size() > 1 && FormatTok->TokenText[0] == '\\' && in getNextToken()
1044 FormatTok->TokenText[1] == '\n') { in getNextToken()
1045 ++FormatTok->NewlinesBefore; in getNextToken()
1048 FormatTok->TokenText = FormatTok->TokenText.substr(2); in getNextToken()
1051 FormatTok->WhitespaceRange = SourceRange( in getNextToken()
1054 FormatTok->OriginalColumn = Column; in getNextToken()
1057 if (FormatTok->Tok.is(tok::comment)) { in getNextToken()
1059 StringRef UntrimmedText = FormatTok->TokenText; in getNextToken()
1060 FormatTok->TokenText = FormatTok->TokenText.rtrim(" \t\v\f"); in getNextToken()
1061 TrailingWhitespace = UntrimmedText.size() - FormatTok->TokenText.size(); in getNextToken()
1062 } else if (FormatTok->Tok.is(tok::raw_identifier)) { in getNextToken()
1063 IdentifierInfo &Info = IdentTable.get(FormatTok->TokenText); in getNextToken()
1064 FormatTok->Tok.setIdentifierInfo(&Info); in getNextToken()
1065 FormatTok->Tok.setKind(Info.getTokenID()); in getNextToken()
1067 FormatTok->isOneOf(tok::kw_struct, tok::kw_union, tok::kw_delete)) { in getNextToken()
1068 FormatTok->Tok.setKind(tok::identifier); in getNextToken()
1069 FormatTok->Tok.setIdentifierInfo(nullptr); in getNextToken()
1071 } else if (FormatTok->Tok.is(tok::greatergreater)) { in getNextToken()
1072 FormatTok->Tok.setKind(tok::greater); in getNextToken()
1073 FormatTok->TokenText = FormatTok->TokenText.substr(0, 1); in getNextToken()
1075 } else if (FormatTok->Tok.is(tok::lessless)) { in getNextToken()
1076 FormatTok->Tok.setKind(tok::less); in getNextToken()
1077 FormatTok->TokenText = FormatTok->TokenText.substr(0, 1); in getNextToken()
1083 StringRef Text = FormatTok->TokenText; in getNextToken()
1088 FormatTok->ColumnWidth = in getNextToken()
1090 Column += FormatTok->ColumnWidth; in getNextToken()
1092 FormatTok->IsMultiline = true; in getNextToken()
1095 FormatTok->ColumnWidth = encoding::columnWidthWithTabs( in getNextToken()
1100 FormatTok->LastLineColumnWidth = encoding::columnWidthWithTabs( in getNextToken()
1103 Column = FormatTok->LastLineColumnWidth; in getNextToken()
1106 FormatTok->IsForEachMacro = in getNextToken()
1108 FormatTok->Tok.getIdentifierInfo()); in getNextToken()
1110 return FormatTok; in getNextToken()
1113 FormatToken *FormatTok; member in clang::format::__anonf8d6a77d0111::FormatTokenLexer