Lines Matching refs:stackPtr
79 for ($stackPtr = 1; $stackPtr < $numTokens; $stackPtr++) {
80 $token = $tokens[$stackPtr];
101 echo "\tProcess token $stackPtr: $type => $content".PHP_EOL;
105 && $tokens[($stackPtr + 1)]['content'] === 'PHPCS_CSS_T_OPEN_TAG'
108 for ($stackPtr = ($stackPtr + 3); $stackPtr < $numTokens; $stackPtr++) {
109 if ($tokens[$stackPtr]['code'] === T_BITWISE_XOR
110 && $tokens[($stackPtr + 1)]['content'] === 'PHPCS_CSS_T_CLOSE_TAG'
114 $stackPtr += 2;
117 $content .= $tokens[$stackPtr]['content'];
246 array_splice($tokens, $stackPtr, 1, $commentTokens);
248 $stackPtr--;
277 for ($stackPtr = 0; $stackPtr < $numTokens; $stackPtr++) {
278 $token = $finalTokens[$stackPtr];
283 echo "\tProcess token $stackPtr: $type => $content".PHP_EOL;
329 if ($finalTokens[($stackPtr + 1)]['code'] === T_STRING) {
330 if ($finalTokens[($stackPtr - 1)]['code'] === T_STRING) {
331 …$newContent = $finalTokens[($stackPtr - 1)]['content'].'-'.$finalTokens[($stackPtr + 1)]['content'…
335 … $old = PHP_CodeSniffer::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
337 … echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$old\" to \"$new\"".PHP_EOL;
340 $finalTokens[($stackPtr + 1)]['content'] = $newContent;
341 unset($finalTokens[$stackPtr]);
342 unset($finalTokens[($stackPtr - 1)]);
344 $newContent = '-'.$finalTokens[($stackPtr + 1)]['content'];
346 $finalTokens[($stackPtr + 1)]['content'] = $newContent;
347 unset($finalTokens[$stackPtr]);
349 } else if ($finalTokens[($stackPtr + 1)]['code'] === T_LNUMBER) {
353 … $content = PHP_CodeSniffer::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
354 …echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$content\" to \"-$content\"".PHP_EOL;
357 … $finalTokens[($stackPtr + 1)]['content'] = '-'.$finalTokens[($stackPtr + 1)]['content'];
358 unset($finalTokens[$stackPtr]);
368 for ($x = ($stackPtr - 1); $x >= 0; $x--) {
385 for ($x = ($stackPtr + 1); $x < $numTokens; $x++) {
408 for ($i = ($stackPtr + 1); $i <= $y; $i++) {
433 $stackPtr = $i;
449 } else if ($finalTokens[$stackPtr]['content'][0] === '-'
450 && $finalTokens[($stackPtr + 1)]['code'] === T_STRING
452 if (isset($finalTokens[($stackPtr - 1)]) === true
453 && $finalTokens[($stackPtr - 1)]['code'] === T_STRING
455 …$newContent = $finalTokens[($stackPtr - 1)]['content'].$finalTokens[$stackPtr]['content'].$finalTo…
459 … $old = PHP_CodeSniffer::prepareForOutput($finalTokens[($stackPtr + 1)]['content']);
461 … echo "\t\t=> token ".($stackPtr + 1)." content changed from \"$old\" to \"$new\"".PHP_EOL;
464 $finalTokens[($stackPtr + 1)]['content'] = $newContent;
465 unset($finalTokens[$stackPtr]);
466 unset($finalTokens[($stackPtr - 1)]);
468 … $newContent = $finalTokens[$stackPtr]['content'].$finalTokens[($stackPtr + 1)]['content'];
470 $finalTokens[($stackPtr + 1)]['content'] = $newContent;
471 unset($finalTokens[$stackPtr]);