Joel Grunbaum
2021-07-13 fb9b06b34e95f120a6ec78bd1ddf275c7eb03edb
initial main for ast and dot testing
1 files added
22 ■■■■■ changed files
main.cpp 22 ●●●●● patch | view | raw | blame | history
main.cpp
New file
@@ -0,0 +1,22 @@
#include <iostream>
#include <string>
#include "ast.h"
#include "gens.h"
int main(int argc, char** argv)
{
    Document *d = new Document(NULL, NULL, NULL);
    Block_Line *b = new Block_Line();
    Line_Word *lw = new Line_Word();
    std::string s = "Hello";
    dot_gen *v = new dot_gen("temp.dot");
    d->add_block(b);
    b->add_line(lw);
    lw->add_word(new Format_Bold(new Text("Hello")));
    lw->add_word(new Format_Italic(new Text("World")));
    lw->add_word(new Text("Test"));
    d->visit(v);
    delete d;
    delete v;
}