new を使えるようにする。

unknown: html => {"type":"html","value":"<!-- truncate -->","position":{"start":{"line":4,"column":1,"offset":17},"end":{"line":4,"column":18,"offset":34}}}
// -lgccpp
#include <gc_cpp.h>

struct Line : public gc_cleanup {
  Line(int n, Line *prevl = nullptr) : linenumber(n), prev(prevl) {
    if (prev) {
      prev->next = this;
    }
  }
  ~Line() {}
  Line(const Line &) = delete;
  Line &operator=(const Line &) = delete;
};

順次 class 化して constructor と destructor を使えるようにしていく。 安全のため default constructor と copy constructor を使えないようにしておく。 TabBuffer, Buffer, Line, Anchor, FormList, HRequest, Str など。 これが済めば、member に std::string などを使えるようになる。 std::vector, std::unordered_map, std::list などでシンプル化を推進。