Files
BlitzLLVM/code_compiler/source/ast/arithmetic.hpp
T
Michael Fabian 'Xaymar' Dirks fa81c2a7fa Latest stuff, rewriting lexer
2024-06-25 18:59:15 +02:00

30 lines
735 B
C++

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