Symfony\Component\CssSelector\Tokenizer::tokenizeSymbol PHP Метод

tokenizeSymbol() защищенный Метод

protected tokenizeSymbol ( $s, $pos )
    protected function tokenizeSymbol($s, $pos)
    {
        $start = $pos;
        if (!preg_match('#[^\\w\\-]#', $s, $match, PREG_OFFSET_CAPTURE, $pos)) {
            // Goes to end of s
            return array(substr($s, $start), strlen($s));
        }
        $matchStart = $match[0][1];
        if ($matchStart == $pos) {
            throw new SyntaxError(sprintf('Unexpected symbol: %s at %s', $s[$pos], $pos));
        }
        $result = substr($s, $start, $matchStart - $start);
        $pos = $matchStart;
        return array($result, $pos);
    }