Lines Matching refs:FormatTok

766       : FormatTok(nullptr), IsFirstToken(true), GreaterStashed(false),
1161 Token Tok = FormatTok->Tok;
1162 StringRef TokenText = FormatTok->TokenText;
1164 unsigned OriginalColumn = FormatTok->OriginalColumn;
1165 FormatTok = new (Allocator.Allocate()) FormatToken;
1166 FormatTok->Tok = Tok;
1168 FormatTok->Tok.getLocation().getLocWithOffset(Tok.getLength() - 1);
1169 FormatTok->Tok.setLocation(TokLocation);
1170 FormatTok->WhitespaceRange = SourceRange(TokLocation, TokLocation);
1171 FormatTok->TokenText = TokenText;
1172 FormatTok->ColumnWidth = 1;
1173 FormatTok->OriginalColumn = OriginalColumn + 1;
1175 return FormatTok;
1188 FormatTok = new (Allocator.Allocate()) FormatToken;
1189 readRawToken(*FormatTok);
1191 FormatTok->Tok.getLocation().getLocWithOffset(-TrailingWhitespace);
1192 FormatTok->IsFirst = IsFirstToken;
1197 while (FormatTok->Tok.is(tok::unknown)) {
1198 StringRef Text = FormatTok->TokenText;
1215 ++FormatTok->NewlinesBefore;
1216 FormatTok->HasUnescapedNewline = !EscapesNewline(i - 1);
1217 FormatTok->LastNewlineOffset = WhitespaceLength + i + 1;
1221 FormatTok->LastNewlineOffset = WhitespaceLength + i + 1;
1236 FormatTok->Type = TT_ImplicitStringLiteral;
1239 FormatTok->Type = TT_ImplicitStringLiteral;
1242 if (FormatTok->Type == TT_ImplicitStringLiteral)
1246 if (FormatTok->is(TT_ImplicitStringLiteral))
1248 WhitespaceLength += FormatTok->Tok.getLength();
1250 readRawToken(*FormatTok);
1257 while (FormatTok->TokenText.size() > 1 && FormatTok->TokenText[0] == '\\' &&
1258 FormatTok->TokenText[1] == '\n') {
1259 ++FormatTok->NewlinesBefore;
1261 FormatTok->LastNewlineOffset = 2;
1263 FormatTok->TokenText = FormatTok->TokenText.substr(2);
1266 FormatTok->WhitespaceRange = SourceRange(
1269 FormatTok->OriginalColumn = Column;
1272 if (FormatTok->Tok.is(tok::comment)) {
1274 StringRef UntrimmedText = FormatTok->TokenText;
1275 FormatTok->TokenText = FormatTok->TokenText.rtrim(" \t\v\f");
1276 TrailingWhitespace = UntrimmedText.size() - FormatTok->TokenText.size();
1277 } else if (FormatTok->Tok.is(tok::raw_identifier)) {
1278 IdentifierInfo &Info = IdentTable.get(FormatTok->TokenText);
1279 FormatTok->Tok.setIdentifierInfo(&Info);
1280 FormatTok->Tok.setKind(Info.getTokenID());
1282 FormatTok->isOneOf(tok::kw_struct, tok::kw_union, tok::kw_delete,
1284 FormatTok->Tok.setKind(tok::identifier);
1285 FormatTok->Tok.setIdentifierInfo(nullptr);
1287 FormatTok->isOneOf(tok::kw_struct, tok::kw_union,
1289 FormatTok->Tok.setKind(tok::identifier);
1290 FormatTok->Tok.setIdentifierInfo(nullptr);
1292 } else if (FormatTok->Tok.is(tok::greatergreater)) {
1293 FormatTok->Tok.setKind(tok::greater);
1294 FormatTok->TokenText = FormatTok->TokenText.substr(0, 1);
1296 } else if (FormatTok->Tok.is(tok::lessless)) {
1297 FormatTok->Tok.setKind(tok::less);
1298 FormatTok->TokenText = FormatTok->TokenText.substr(0, 1);
1302 // Now FormatTok is the next non-whitespace token.
1304 StringRef Text = FormatTok->TokenText;
1309 FormatTok->ColumnWidth =
1311 Column += FormatTok->ColumnWidth;
1313 FormatTok->IsMultiline = true;
1316 FormatTok->ColumnWidth = encoding::columnWidthWithTabs(
1321 FormatTok->LastLineColumnWidth = encoding::columnWidthWithTabs(
1324 Column = FormatTok->LastLineColumnWidth;
1332 FormatTok->Tok.getIdentifierInfo()) != ForEachMacros.end()) {
1333 FormatTok->Type = TT_ForEachMacro;
1334 } else if (FormatTok->is(tok::identifier)) {
1336 FormatTok->Type = TT_MacroBlockBegin;
1338 FormatTok->Type = TT_MacroBlockEnd;
1343 return FormatTok;
1346 FormatToken *FormatTok;