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
26
27
28
29
30
31
| #ifndef INTERPRETER_OPERATION_HPP
| #define INTERPRETER_OPERATION_HPP
|
| #include <cstdint>
|
| #include <memory>
| #include <string>
|
| #include "ExpressionNode.hpp"
|
| namespace Interpreter {
| enum OperationType : std::uint8_t {
| Assignment,
| Expression,
|
| };
|
| struct Operation {
| OperationType type;
|
| // Általános mezők
| std::string targetVariable;
| std::unique_ptr<ExpressionNode> expression;
|
| Operation(OperationType t, std::string var, std::unique_ptr<ExpressionNode> expr)
| : type(t), targetVariable(std::move(var)), expression(std::move(expr)) {}
| };
|
|
| }; // namespace Interpreter
| #endif
|
|