protected function lexComment(int $line, int $column, Token $prev): Token
    {
        $start = $this->position;

        do {
            $code = $this->readCharCode(++$this->position);
        } while ($code !== 0 && ($code > 0x001f || 0x0009 === $code)); // SourceCharacter but not LineTerminator

        return new Token(
            TokenKindEnum::COMMENT,
            $start,
            $this->position,
            $line,
            $column,
            $prev,
            sliceString($this->body, $start + 1, $this->position)
        );
    }
protected function lexComment(int $line, int $column, Token $prev): Token
    {
        $start = $this->position;

        do {
            $code = $this->readCharCode(++$this->position);
        } while ($code !== 0 && ($code > 0x001f || 0x0009 === $code)); // SourceCharacter but not LineTerminator

        return new Token(
            TokenKindEnum::COMMENT,
            $start,
            $this->position,
            $line,
            $column,
            $prev,
            sliceString($this->body, $start + 1, $this->position)
        );
    }
protected function lexComment ( int $ line , int $ column , Token $ prev ) : Token { $ start = $ this -> position ; do { $ code = $ this -> readCharCode ( ++ $ this -> position ) ; } while ( $ code !== 0 && ( $ code > 0x001f || 0x0009 === $ code ) ) ; // SourceCharacter but not LineTerminator return new Token ( TokenKindEnum :: COMMENT , $ start , $ this -> position , $ line , $ column , $ prev , sliceString ( $ this -> body , $ start + 1 , $ this -> position ) ) ; }
Reads a comment token from the source file.

@param int   $line
@param int   $column
@param Token $prev
@return Token
Reads a comment token from the source file .