protected function readName($position)
    {
        $end = $position + 1;
        $length = $this->source->getLength();
        $body = $this->source->getBody();

        while (
            $end < $length &&
            ($code = $this->charCodeAt($end)) &&
            (
                $code === 95 || // _
                $code >= 48 && $code <= 57 || // 0-9
                $code >= 65 && $code <= 90 || // A-Z
                $code >= 97 && $code <= 122 // a-z
            )
        ) {
            ++$end;
        }

        $value = mb_substr($body, $position, $end - $position, 'UTF-8');
        return new Token(Token::NAME_TYPE, $position, $end, $value);
    }