Lines Matching defs:tokens
31 const TokenSequence &repl, std::size_t firstToken, std::size_t tokens)
32 : replacement_{Tokenize({}, repl, firstToken, tokens)} {}
35 const TokenSequence &repl, std::size_t firstToken, std::size_t tokens,
38 replacement_{Tokenize(argNames, repl, firstToken, tokens)} {}
87 const TokenSequence &token, std::size_t firstToken, std::size_t tokens) {
95 for (std::size_t j{0}; j < tokens; ++j) {
117 const TokenSequence &tokens, AllSources &allSources) {
121 for (std::size_t j{0}; j < tokens.SizeInTokens(); ++j) {
122 const CharBlock &token{tokens.TokenAt(j)};
126 Provenance from{tokens.GetTokenProvenance(j, k)};
143 std::size_t tokens{text.SizeInTokens()};
144 for (std::size_t j{0}; j < tokens; ++j) {
157 std::size_t tokens{text.SizeInTokens()};
159 for (std::size_t j{0}; j < tokens; ++j) {
190 std::size_t tokens{replacement_.SizeInTokens()};
191 for (std::size_t j{0}; j < tokens; ++j) {
237 if (next >= tokens || !IsTokenPasting(replacement_.TokenAt(next))) {
260 j + 2 < tokens && replacement_.TokenAt(j + 1).OnlyNonBlank() == '(' &&
317 std::size_t tokens{input.SizeInTokens()};
319 for (; j < tokens; ++j) {
326 if (j == tokens) {
333 // parenthesis), if tokens remain in the input, append them to the
335 // the caller may try again with remaining tokens in its input.
362 for (; j < tokens; ++j) {
378 ok = *rightParenthesis < tokens &&
454 while (++k < tokens) {
464 result.Put(input, j, tokens - j);
472 for (int nesting{0}; k < tokens; ++k) {
492 if (k >= tokens && partialFunctionLikeMacro) {
494 result.Put(input, j, tokens - j);
496 } else if (k >= tokens || argStart.size() < def->argumentCount() ||
531 TokenSequence Preprocessor::ReplaceMacros(const TokenSequence &tokens,
535 tokens, prescanner, partialFunctionLikeMacro, inIfExpression)}) {
538 return tokens;
542 std::size_t tokens{dir.SizeInTokens()};
544 if (j == tokens) {
552 while (tokens > 0 && dir.TokenAt(tokens - 1).IsBlank()) {
553 --tokens;
555 if (j == tokens) {
566 if (j < tokens && IsLegalIdentifierStart(dir.TokenAt(j)[0])) {
573 prescanner.Say(dir.GetTokenProvenanceRange(j < tokens ? j : tokens - 1),
579 if (++j < tokens && dir.TokenAt(j).OnlyNonBlank() == '(') {
597 if (j == tokens) {
598 prescanner.Say(dir.GetTokenProvenanceRange(tokens - 1),
612 if (j == tokens) {
613 prescanner.Say(dir.GetTokenProvenanceRange(tokens - 1),
627 nameToken, Definition{argName, dir, j, tokens - j, isVariadic}));
631 std::make_pair(nameToken, Definition{dir, j, tokens - j}));
636 dir.GetIntervalProvenanceRange(dirOffset, tokens - dirOffset),
643 dir.GetIntervalProvenanceRange(j, tokens - j),
644 "#undef: excess tokens at end of directive"_port_en_US);
654 dir.GetIntervalProvenanceRange(dirOffset, tokens - dirOffset),
661 dir.GetIntervalProvenanceRange(j, tokens - j),
662 "#%s: excess tokens at end of directive"_port_en_US, dirName);
674 if (IsIfPredicateTrue(dir, j, tokens - j, prescanner)) {
684 dir.GetIntervalProvenanceRange(j, tokens - j),
685 "#else: excess tokens at end of directive"_port_en_US);
714 dir.GetIntervalProvenanceRange(j, tokens - j),
715 "#endif: excess tokens at end of directive"_port_en_US);
725 dir.GetIntervalProvenanceRange(dirOffset, tokens - dirOffset),
729 dir.GetIntervalProvenanceRange(dirOffset, tokens - dirOffset),
733 dir.GetIntervalProvenanceRange(dirOffset, tokens - dirOffset),
736 if (j == tokens) {
738 dir.GetIntervalProvenanceRange(dirOffset, tokens - dirOffset),
743 TokenSequence path{dir, j, tokens - j};
766 dir.GetIntervalProvenanceRange(j, tokens - j),
782 prescanner.Say(dir.GetTokenProvenanceRange(j < tokens ? j : tokens - 1),
796 dir.GetIntervalProvenanceRange(j, tokens - j),
852 std::size_t tokens{line.SizeInTokens()};
854 if (j == tokens || line.TokenAt(j).ToString() != "#") {
855 *rest = tokens;
859 if (j == tokens) {
860 *rest = tokens;
996 std::size_t tokens{token.SizeInTokens()};
997 CHECK(tokens > 0);
998 if (*atToken >= tokens) {
1028 } else if (t == "." && *atToken + 2 < tokens &&
1056 if (*atToken < tokens && token.TokenAt(*atToken).OnlyNonBlank() == ')') {
1060 if (*atToken >= tokens) {
1088 while (*atToken < tokens) {
1091 if (t == "." && *atToken + 2 < tokens &&
1226 if (*atToken >= tokens || token.TokenAt(*atToken).ToString() != ":") {
1276 std::size_t tokens{dir.SizeInTokens()};
1281 for (; j < tokens; j = dir.SkipBlanks(j + 1)) {