Files
interpreter-cpp/src/ast/expressions/infix.cpp
2025-07-11 09:12:42 +02:00

20 lines
378 B
C++

#include "infix.hpp"
#include "token/token.hpp"
namespace ast {
std::string infix_expr::token_literal() const {
return token.literal;
}
std::string infix_expr::str() const {
return "(" + left->str() + " " + op + " " + right->str() + ")";
}
infix_expr::~infix_expr() {
delete left;
delete right;
};
} // namespace ast