mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* use new formatter for ERROR_PRINT, added ERROR_PRINTLN * remove old log define * fix comments
31 lines
731 B
C++
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
|