Lines Matching refs:Tokens
12 /// which turns a stream of tokens into UnwrappedLines.
126 else if (!Parser.Line->Tokens.empty())
127 Parser.CurrentLines = &Parser.Line->Tokens.back().Children;
135 if (!Parser.Line->Tokens.empty()) {
138 assert(Parser.Line->Tokens.empty());
173 IndexedTokenSource(ArrayRef<FormatToken *> Tokens)
174 : Tokens(Tokens), Position(-1) {}
178 return Tokens[Position];
188 return Tokens[Position];
194 ArrayRef<FormatToken *> Tokens;
202 ArrayRef<FormatToken *> Tokens,
205 CurrentLines(&Lines), Style(Style), Keywords(Keywords), Tokens(nullptr),
206 Callback(Callback), AllTokens(Tokens), PPBranchLevel(-1) {}
225 Tokens = &TokenSource;
262 // Make sure to format the remaining tokens.
312 // We'll parse forward through the tokens until we hit
316 unsigned StoredPosition = Tokens->getPosition();
318 // Keep a stack of positions of lbrace tokens. We will
328 NextTok = Tokens->getNextToken();
398 FormatTok = Tokens->setPosition(StoredPosition);
442 if (Line.Tokens.size() < 4)
444 auto I = Line.Tokens.begin();
489 ScopedMacroState MacroState(*Line, Tokens, FormatTok);
623 // Here we blacklist certain tokens that are not usually the first token in an
631 // Tokens that can only be used as binary operators and a part of
905 FormatTok->is(Keywords.kw_function) && Line->Tokens.size() > 0) {
919 if (Line->Tokens.size() == 1 &&
982 if (!Line->Tokens.empty() &&
983 (Line->Tokens.back().Tok->isOneOf(tok::identifier, tok::kw_operator,
985 Line->Tokens.back().Tok->closesScope() ||
986 Line->Tokens.back().Tok->isSimpleTypeSpecifier())) {
1576 unsigned StoredPosition = Tokens->getPosition();
1578 FormatToken *Tok = Tokens->getNextToken();
1588 Tok = Tokens->getNextToken();
1590 FormatTok = Tokens->setPosition(StoredPosition);
1797 for (std::list<UnwrappedLineNode>::const_iterator I = Line.Tokens.begin(),
1798 E = Line.Tokens.end();
1802 for (std::list<UnwrappedLineNode>::const_iterator I = Line.Tokens.begin(),
1803 E = Line.Tokens.end();
1817 if (Line->Tokens.empty())
1824 Line->Tokens.clear();
1841 bool JustComments = Line->Tokens.empty();
1866 FormatTok = Tokens->getNextToken();
1872 bool SwitchToPreprocessorLines = !Line->Tokens.empty();
1890 FormatTok = Tokens->getNextToken();
1913 Line->Tokens.push_back(UnwrappedLineNode(Tok));
1915 Line->Tokens.back().Tok->MustBreakBefore = true;