test_ast.cpp 334 Bytes
Newer Older
lyz's avatar
lyz committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include "ast.hpp"

#include <iostream>

int main(int argc, char **argv) {
    if (argc != 2) {
        std::cout << "usage: " << argv[0] << " <cminus_file>" << std::endl;
    } else {
        auto s = parse(argv[1]);
        auto a = AST(s);
        auto printer = ASTPrinter();
        a.run_visitor(printer);
    }
    return 0;
}