A simple scripting language in C++
Ferenc Szontágh
2025-04-15 3895272a7f238c9aef0b584bd3b10b900445245d
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