blob: aa0ea4c4f85e51ebecc0596e78a971cf9084c924 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
//
// Created by martial.simon on 2/27/25.
//
#pragma once
#include "visitor.hh"
namespace visitor
{
class PrintVisitor : public Visitor
{
public:
void visit(const tree::Tree& e);
void visit(const tree::Node& e);
void visit(const tree::AddNode& e);
void visit(const tree::SubNode& e);
void visit(const tree::MulNode& e);
void visit(const tree::DivNode& e);
void visit(const tree::Leaf& e);
private:
int value_ = 0;
};
} // namespace visitor
|