15 lines
249 B
C++

#ifndef PRINTER_HH
#define PRINTER_HH
#include "expr.hh"
#include <string>
class AstPrinter {
public:
std::string print(const Expr &expr);
private:
std::string parenthesize(const std::string &name, std::vector<const Expr *> exprs);
};
#endif