/*
 * UnaryExpression.h
 *
 *  Created on: Jan 1, 2013
 *      Author: att
 */

#ifndef UNARYEXPRESSION_H_
#define UNARYEXPRESSION_H_

#include "ASTExpression.h"
/**
 * UnaryExpression is abstraction of unary operator and it's operand (right binding);
 * It can be build like that: UnaryExpression(some_expression, "-")
 */
class UnaryExpression: public ASTExpression {
public:

	std::string oper;
	std::string get_operator() { return oper; }
	virtual void accept(Visitor * visitor) { visitor->visit(this); }

	virtual SenchaObject execute();
	virtual SenchaObject evaluate();

	UnaryExpression(ASTExpression * argument, std::string oper);
	UnaryExpression();
	virtual ~UnaryExpression();
};

#endif /* UNARYEXPRESSION_H_ */
