48 , _operand{ std::move(
operand) }
59 [[nodiscard]] TCALC_INLINE
auto&
operand() const noexcept {
return _operand; }
66 TCALC_INLINE
auto&
operand() noexcept {
return _operand; }
Base class for AST nodes.
Definition node.hpp:87
TCALC_INLINE auto type() const noexcept
Get the node type.
Definition node.hpp:109
Unary operation node.
Definition unaryop.hpp:25
TCALC_INLINE auto & operand() const noexcept
Get operand.
Definition unaryop.hpp:59
TCALC_INLINE void operand(NodePtr<> operand) noexcept
Set operand.
Definition unaryop.hpp:73
UnaryOpNode(NodeType type, NodePtr<> operand)
Construct a new Unary Op Node object with operand.
Definition unaryop.hpp:46
TCALC_INLINE auto & operand() noexcept
Get operand.
Definition unaryop.hpp:66
UnaryOpNode(NodeType type)
Construct a new Unary Op Node object without operand.
Definition unaryop.hpp:35
Base class for AST nodes.
std::shared_ptr< NT > NodePtr
Shared pointer to a node.
Definition node.hpp:119
NodeType
AST node type.
Definition node.hpp:30