Files
BlitzLLVM/code_compiler/source/ast/arithmetic.hpp
T

30 lines
735 B
C++
Raw Normal View History

2024-06-25 18:59:15 +02:00
/// AUTOGENERATED COPYRIGHT HEADER START
// Copyright (C) 2017-2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
// AUTOGENERATED COPYRIGHT HEADER END
#pragma once
2024-06-06 13:37:13 +02:00
#include "ast.hpp"
#include "value.hpp"
2024-06-06 14:04:34 +02:00
namespace blitz {
2024-06-25 18:59:15 +02:00
namespace ast {
enum class expression_operator : int8_t {
2024-06-06 13:37:13 +02:00
Add, /*+*/
Subtract, /*-*/
Multiply, /***/
Divide, /*/*/
Invert, /*~*/
Power, /*^*/
Equal, /*=*/
};
2024-06-25 18:59:15 +02:00
class arithmetic_expression : public expression {
2024-06-06 13:37:13 +02:00
public:
2024-06-25 18:59:15 +02:00
arithmetic_expression(expression_operator op, std::unique_ptr<expression> left, std::unique_ptr<expression> right);
virtual ~arithmetic_expression();
2024-06-06 13:37:13 +02:00
private:
2024-06-25 18:59:15 +02:00
expression_operator m_operator;
std::unique_ptr<expression> m_left, m_right;
2024-06-06 13:37:13 +02:00
};
}
}