polserver/pol-core/bscript/compiler/ast/UnaryOperator.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

32 lines
711 B
C++

#ifndef POLSERVER_UNARYOPERATOR_H
#define POLSERVER_UNARYOPERATOR_H
#include "bscript/compiler/ast/Expression.h"
#ifndef __TOKENS_H
#include "tokens.h"
#endif
namespace Pol::Bscript::Compiler
{
class NodeVisitor;
class UnaryOperator : public Expression
{
public:
UnaryOperator( const SourceLocation& source_location, std::string op, BTokenId token_id,
std::unique_ptr<Expression> operand );
void accept( NodeVisitor& ) override;
void describe_to( std::string& ) const override;
Expression& operand();
std::unique_ptr<Expression> take_operand();
const std::string op;
const BTokenId token_id;
};
} // namespace Pol::Bscript::Compiler
#endif // POLSERVER_UNARYOPERATOR_H