Lines Matching refs:FormatTok
763 : FormatTok(nullptr), IsFirstToken(true), GreaterStashed(false), in FormatTokenLexer()
1158 Token Tok = FormatTok->Tok; in getStashedToken()
1159 StringRef TokenText = FormatTok->TokenText; in getStashedToken()
1161 unsigned OriginalColumn = FormatTok->OriginalColumn; in getStashedToken()
1162 FormatTok = new (Allocator.Allocate()) FormatToken; in getStashedToken()
1163 FormatTok->Tok = Tok; in getStashedToken()
1165 FormatTok->Tok.getLocation().getLocWithOffset(Tok.getLength() - 1); in getStashedToken()
1166 FormatTok->Tok.setLocation(TokLocation); in getStashedToken()
1167 FormatTok->WhitespaceRange = SourceRange(TokLocation, TokLocation); in getStashedToken()
1168 FormatTok->TokenText = TokenText; in getStashedToken()
1169 FormatTok->ColumnWidth = 1; in getStashedToken()
1170 FormatTok->OriginalColumn = OriginalColumn + 1; in getStashedToken()
1172 return FormatTok; in getStashedToken()
1185 FormatTok = new (Allocator.Allocate()) FormatToken; in getNextToken()
1186 readRawToken(*FormatTok); in getNextToken()
1188 FormatTok->Tok.getLocation().getLocWithOffset(-TrailingWhitespace); in getNextToken()
1189 FormatTok->IsFirst = IsFirstToken; in getNextToken()
1194 while (FormatTok->Tok.is(tok::unknown)) { in getNextToken()
1195 StringRef Text = FormatTok->TokenText; in getNextToken()
1212 ++FormatTok->NewlinesBefore; in getNextToken()
1213 FormatTok->HasUnescapedNewline = !EscapesNewline(i - 1); in getNextToken()
1214 FormatTok->LastNewlineOffset = WhitespaceLength + i + 1; in getNextToken()
1218 FormatTok->LastNewlineOffset = WhitespaceLength + i + 1; in getNextToken()
1233 FormatTok->Type = TT_ImplicitStringLiteral; in getNextToken()
1236 FormatTok->Type = TT_ImplicitStringLiteral; in getNextToken()
1241 if (FormatTok->is(TT_ImplicitStringLiteral)) in getNextToken()
1243 WhitespaceLength += FormatTok->Tok.getLength(); in getNextToken()
1245 readRawToken(*FormatTok); in getNextToken()
1252 while (FormatTok->TokenText.size() > 1 && FormatTok->TokenText[0] == '\\' && in getNextToken()
1253 FormatTok->TokenText[1] == '\n') { in getNextToken()
1254 ++FormatTok->NewlinesBefore; in getNextToken()
1256 FormatTok->LastNewlineOffset = 2; in getNextToken()
1258 FormatTok->TokenText = FormatTok->TokenText.substr(2); in getNextToken()
1261 FormatTok->WhitespaceRange = SourceRange( in getNextToken()
1264 FormatTok->OriginalColumn = Column; in getNextToken()
1267 if (FormatTok->Tok.is(tok::comment)) { in getNextToken()
1269 StringRef UntrimmedText = FormatTok->TokenText; in getNextToken()
1270 FormatTok->TokenText = FormatTok->TokenText.rtrim(" \t\v\f"); in getNextToken()
1271 TrailingWhitespace = UntrimmedText.size() - FormatTok->TokenText.size(); in getNextToken()
1272 } else if (FormatTok->Tok.is(tok::raw_identifier)) { in getNextToken()
1273 IdentifierInfo &Info = IdentTable.get(FormatTok->TokenText); in getNextToken()
1274 FormatTok->Tok.setIdentifierInfo(&Info); in getNextToken()
1275 FormatTok->Tok.setKind(Info.getTokenID()); in getNextToken()
1277 FormatTok->isOneOf(tok::kw_struct, tok::kw_union, tok::kw_delete)) { in getNextToken()
1278 FormatTok->Tok.setKind(tok::identifier); in getNextToken()
1279 FormatTok->Tok.setIdentifierInfo(nullptr); in getNextToken()
1281 FormatTok->isOneOf(tok::kw_struct, tok::kw_union)) { in getNextToken()
1282 FormatTok->Tok.setKind(tok::identifier); in getNextToken()
1283 FormatTok->Tok.setIdentifierInfo(nullptr); in getNextToken()
1285 } else if (FormatTok->Tok.is(tok::greatergreater)) { in getNextToken()
1286 FormatTok->Tok.setKind(tok::greater); in getNextToken()
1287 FormatTok->TokenText = FormatTok->TokenText.substr(0, 1); in getNextToken()
1289 } else if (FormatTok->Tok.is(tok::lessless)) { in getNextToken()
1290 FormatTok->Tok.setKind(tok::less); in getNextToken()
1291 FormatTok->TokenText = FormatTok->TokenText.substr(0, 1); in getNextToken()
1297 StringRef Text = FormatTok->TokenText; in getNextToken()
1302 FormatTok->ColumnWidth = in getNextToken()
1304 Column += FormatTok->ColumnWidth; in getNextToken()
1306 FormatTok->IsMultiline = true; in getNextToken()
1309 FormatTok->ColumnWidth = encoding::columnWidthWithTabs( in getNextToken()
1314 FormatTok->LastLineColumnWidth = encoding::columnWidthWithTabs( in getNextToken()
1317 Column = FormatTok->LastLineColumnWidth; in getNextToken()
1325 FormatTok->Tok.getIdentifierInfo()) != ForEachMacros.end()) { in getNextToken()
1326 FormatTok->Type = TT_ForEachMacro; in getNextToken()
1327 } else if (FormatTok->is(tok::identifier)) { in getNextToken()
1329 FormatTok->Type = TT_MacroBlockBegin; in getNextToken()
1331 FormatTok->Type = TT_MacroBlockEnd; in getNextToken()
1336 return FormatTok; in getNextToken()
1339 FormatToken *FormatTok; member in clang::format::__anonf8d6a77d0111::FormatTokenLexer