#include <tree.h>
Public Member Functions | |
virtual void | emit (PreLinkBytecode &bytecodes) const |
Generate bytecode. | |
virtual Node * | expandToAsebaTree (std::wostream *dump, unsigned int index=0) |
expand to (op)left[index] | |
virtual Node * | optimize (std::wostream *dump) |
Optimize this node, return the optimized node. | |
virtual UnaryArithmeticNode * | shallowCopy () |
Return a shallow copy of the object (children point to the same objects) | |
virtual std::wstring | toNodeName () const |
Return a string representation of the name of this node. | |
virtual std::wstring | toWString () const |
Return a string representation of this node. | |
virtual ReturnType | typeCheck () const |
Typecheck this node, throw an exception if there is any type violation. | |
UnaryArithmeticNode (const SourcePos &sourcePos) | |
Constructor. | |
UnaryArithmeticNode (const SourcePos &sourcePos, AsebaUnaryOperator op, Node *child) | |
Constructor. | |
Public Attributes | |
AsebaUnaryOperator | op |
operator |
Node for unary arithmetic children[0] is the expression to negate
Aseba::UnaryArithmeticNode::UnaryArithmeticNode | ( | const SourcePos & | sourcePos | ) | [inline] |
Node * Aseba::UnaryArithmeticNode::expandToAsebaTree | ( | std::wostream * | dump, |
unsigned int | index = 0 |
||
) | [virtual] |
expand to (op)left[index]
Reimplemented from Aseba::Node.
Definition at line 78 of file tree-expand.cpp.
virtual UnaryArithmeticNode* Aseba::UnaryArithmeticNode::shallowCopy | ( | ) | [inline, virtual] |
Return a shallow copy of the object (children point to the same objects)
Implements Aseba::Node.
virtual std::wstring Aseba::UnaryArithmeticNode::toNodeName | ( | ) | const [inline, virtual] |
Return a string representation of the name of this node.
Implements Aseba::Node.