public function addValue(string $key, $val, string $comment = '') : TomlBuilder
    {
        $this->currentKey = $key;
        $this->exceptionIfKeyEmpty($key);
        $this->addKey($key);

        if (!$this->isUnquotedKey($key)) {
            $key = '"'.$key.'"';
        }

        $line = "{$key} = {$this->dumpValue($val)}";

        if (!empty($comment)) {
            $line .= ' '.$this->dumpComment($comment);
        }

        $this->append($line, true);

        return $this;
    }