src/Language/Lexer.php
protected function positionAfterWhitespace($start)
    {
        $position = $start;
        $length = $this->source->getLength();

        while ($start < $length) {
            $code = $this->charCodeAt($position);

            // Skip whitespace.
            if (
                $code === 32 || // space
                $code === 44 || // comma
                $code === 160 || // '\xa0'
                $code === 0x2028 || // line separator
                $code === 0x2029 || // paragraph separator
                $code > 8 && $code < 14 // whitespace
            ) {
                ++$position;
                // Skip comments.
            } elseif ($code === 35) { // #
                ++$position;

                while (
                    $position < $length &&
                    ($code = $this->charCodeAt($position)) &&
                    $code !== 10 && $code !== 13 && $code !== 0x2028 && $code !== 0x2029
                ) {
                    ++$position;
                }
            } else {
                break;
            }
        }

        return $position;
    }
protected function positionAfterWhitespace($start)
    {
        $position = $start;
        $length = $this->source->getLength();

        while ($start < $length) {
            $code = $this->charCodeAt($position);

            // Skip whitespace.
            if (
                $code === 32 || // space
                $code === 44 || // comma
                $code === 160 || // '\xa0'
                $code === 0x2028 || // line separator
                $code === 0x2029 || // paragraph separator
                $code > 8 && $code < 14 // whitespace
            ) {
                ++$position;
                // Skip comments.
            } elseif ($code === 35) { // #
                ++$position;

                while (
                    $position < $length &&
                    ($code = $this->charCodeAt($position)) &&
                    $code !== 10 && $code !== 13 && $code !== 0x2028 && $code !== 0x2029
                ) {
                    ++$position;
                }
            } else {
                break;
            }
        }

        return $position;
    }
protected function positionAfterWhitespace ( $ start ) { $ position = $ start ; $ length = $ this -> source -> getLength ( ) ; while ( $ start < $ length ) { $ code = $ this -> charCodeAt ( $ position ) ; // Skip whitespace. if ( $ code === 32 || // space $ code === 44 || // comma $ code === 160 || // '\xa0' $ code === 0x2028 || // line separator $ code === 0x2029 || // paragraph separator $ code > 8 && $ code < 14 // whitespace ) { ++ $ position ; // Skip comments. } elseif ( $ code === 35 ) { // # ++ $ position ; while ( $ position < $ length && ( $ code = $ this -> charCodeAt ( $ position ) ) && $ code !== 10 && $ code !== 13 && $ code !== 0x2028 && $ code !== 0x2029 ) { ++ $ position ; } } else { break ; } } return $ position ; }
Reads from body starting at startPosition until it finds a non-whitespace
or commented character, then returns the position of that character for
lexing.

@param int $start

@return int
Reads from body starting at startPosition until it finds a non - whitespace or commented character then returns the position of that character for lexing .