Gets the next token type which is $move away from $key, excluding comments

@access private @version 1.0

Paramètres

integer $key current position:

integer $move move this far:

Return value

mixed a token type

1 call to csstidy_print::_seeknocomment()
csstidy_print::_print dans advagg_css_compress/csstidy/class.csstidy_print.inc
Returns the formatted CSS Code and saves it into $this->output_css and $this->output_css_plain

Fichier

advagg_css_compress/csstidy/class.csstidy_print.inc, line 287

Classe

csstidy_print
CSS Printing class

Code

function _seeknocomment($key, $move) {
    $go = $move > 0 ? 1 : -1;
    for ($i = $key + 1; abs($key - $i) - 1 < abs($move); $i += $go) {
        if (!isset($this->tokens[$i])) {
            return;
        }
        if ($this->tokens[$i][0] == COMMENT) {
            $move += 1;
            continue;
        }
        return $this->tokens[$i][0];
    }
}