polserver/pol-core/bscript/compiler/ast/BinaryOperator.h
turleypol 0e675c516a
use new formatter for ERROR_PRINT, added ERROR_PRINTLN (#595)
* use new formatter for ERROR_PRINT, added ERROR_PRINTLN

* remove old log define

* fix comments
2024-01-12 06:51:44 +01:00

31 lines
731 B
C++

#ifndef POLSERVER_BINARYOPERATOR_H
#define POLSERVER_BINARYOPERATOR_H
#include "bscript/compiler/ast/Expression.h"
#include "tokens.h"
namespace Pol::Bscript::Compiler
{
class BinaryOperator : public Expression
{
public:
BinaryOperator( const SourceLocation&, std::unique_ptr<Expression> lhs, std::string op, BTokenId,
std::unique_ptr<Expression> rhs );
void accept( NodeVisitor& ) override;
void describe_to( std::string& ) const override;
Expression& lhs();
Expression& rhs();
std::unique_ptr<Expression> take_lhs();
std::unique_ptr<Expression> take_rhs();
const std::string op;
const BTokenId token_id;
};
} // namespace Pol::Bscript::Compiler
#endif // POLSERVER_BINARYOPERATOR_H