protected function isTagEnd(&$selfClose) {
        $tok = $this->scanner->current();
        if ($tok == '/') {
            $this->scanner->next();
            $this->scanner->whitespace();
            if ($this->scanner->current() == '>') {
                $selfClose = true;
                return true;
            }
            if ($this->scanner->current() === false) {
                $this->parseError("Unexpected EOF inside of tag.");
                return true;
            }
            // Basically, we skip the / token and go on.
            // See 8.2.4.43.
            $this->parseError("Unexpected '%s' inside of a tag.", $this->scanner->current());
            return false;
        }

        if ($this->scanner->current() == '>') {
            return true;
        }
        if ($this->scanner->current() === false) {
            $this->parseError("Unexpected EOF inside of tag.");
            return true;
        }

        return false;
    }