Lines Matching full:tokens
35 for (const auto &N : Line.Tokens) { in forEachToken()
48 Result.Tokens.push_back(std::make_unique<LineNode>()); in MacroCallReconstructor()
62 assert(Result.Tokens.size() == 1 && in takeResult()
63 Result.Tokens.front()->Children.size() == 1); in takeResult()
65 *Result.Tokens.front()->Children.front(), Result.Level); in takeResult()
66 assert(!Final.Tokens.empty()); in takeResult()
84 // Note that hidden tokens can be part of the reconstructed stream in nested in add()
118 // tokens. The tokens to be pushed are children of ExpandedParent in the
162 (!ActiveReconstructedLines.back()->Tokens.empty() && in prepareParent()
163 Parent == ActiveReconstructedLines.back()->Tokens.back()->Tok)) { in prepareParent()
166 while (ActiveReconstructedLines.back()->Tokens.empty() || in prepareParent()
167 (Parent != ActiveReconstructedLines.back()->Tokens.back()->Tok && in prepareParent()
168 ActiveReconstructedLines.back()->Tokens.back()->Tok != in prepareParent()
174 ActiveReconstructedLines.back()->Tokens.back()->Children.push_back( in prepareParent()
177 &*ActiveReconstructedLines.back()->Tokens.back()->Children.back()); in prepareParent()
178 } else if (parentLine().Tokens.back()->Tok != Parent) { in prepareParent()
181 while (Parent != parentLine().Tokens.back()->Tok && in prepareParent()
182 parentLine().Tokens.back()->Tok && in prepareParent()
183 parentLine().Tokens.back()->Tok != OpenMacroParent) { in prepareParent()
211 // And the call: ID(<some>, <tokens>) in reconstruct()
212 // ';' in the expanded stream will reconstruct all of ID(<some>, <tokens>). in reconstruct()
215 // If the order of tokens in the expanded token stream is not the in reconstruct()
216 // same as the order of tokens in the reconstructed stream, we need in reconstruct()
217 // to reconstruct tokens that arrive later in the stream. in reconstruct()
232 } else if (!currentLine()->Tokens.empty()) { in reconstruct()
233 // Map all hidden tokens to the last visible token in the output. in reconstruct()
237 currentLine()->Tokens.back()->Tok; in reconstruct()
242 if (!(*I)->Tokens.empty()) { in reconstruct()
243 SpelledParentToReconstructedParent[Token] = (*I)->Tokens.back()->Tok; in reconstruct()
290 {ID, IU->second->Tokens.begin(), IU->second->Tokens.end()}); in startReconstruction()
302 // Add all tokens in the reconstruction stream to the output until we find the
323 // Check all remaining tokens but the final closing parenthesis and in endReconstruction()
340 // the comma and the remaining tokens in the macro call will in endReconstruction()
343 // one of the cases below plus reconstructed macro argument tokens. in endReconstruction()
347 // Handle the remaining open tokens: in endReconstruction()
350 // - handle tokens that were already reconstructed at an inner expansion in endReconstruction()
352 // - handle tokens when a macro call had more than the expected number of in endReconstruction()
392 // Skip tokens that are not part of the macro call. in processNextReconstructed()
395 // Skip tokens we already expanded during an inner reconstruction. in processNextReconstructed()
406 // Tokens that do not have a macro context are tokens in that are part of the in processNextReconstructed()
411 // of the corresponding opening parenthesis or comma tokens in the in processNextReconstructed()
415 currentLine(), parentLine().Tokens.back()->Tok, Token)); in processNextReconstructed()
416 // All tokens that are children of the previous line's last token in the in processNextReconstructed()
436 [MacroCallStructure.back().Line->Tokens.back()->Tok] = Token; in processNextReconstructed()
452 // Note that any tokens that are tagged with MR_None have been passed as in processNextReconstructed()
473 assert(Result.Tokens.size() == 1 && !Result.Tokens.front()->Children.empty()); in finalize()
480 LineNode &Top = *Result.Tokens.front(); in finalize()
484 LineNode *Last = (*I)->Tokens.back().get(); in finalize()
494 Last = Last->Children.back()->Tokens.back().get(); in finalize()
503 L->Tokens.push_back(std::make_unique<LineNode>(Token)); in appendToken()
511 for (const auto &N : Line.Tokens) { in createUnwrappedLine()
512 Result.Tokens.push_back(N->Tok); in createUnwrappedLine()
513 UnwrappedLineNode &Current = Result.Tokens.back(); in createUnwrappedLine()
516 [](const auto &Child) { return !Child->Tokens.empty(); }); in createUnwrappedLine()
523 [](const auto &Child) { return !Child->Tokens.empty(); }); in createUnwrappedLine()
525 Result.Tokens.splice(Result.Tokens.end(), Line.Tokens); in createUnwrappedLine()
539 if (Child->Tokens.empty()) in createUnwrappedLine()
552 for (const auto &N : Line.Tokens) { in debug()