51 , _left{ std::move(
left) }
52 , _right{ std::move(
right) }
63 [[nodiscard]] TCALC_INLINE
auto&
left() const noexcept {
return _left; }
70 TCALC_INLINE
auto&
left() noexcept {
return _left; }
84 [[nodiscard]] TCALC_INLINE
auto&
right() const noexcept {
return _right; }
91 TCALC_INLINE
auto&
right() noexcept {
return _right; }
100 _right = std::move(
right);
Binary operation base class.
Definition binaryop.hpp:26
TCALC_INLINE void right(NodePtr<> right) noexcept
Set the right subnode.
Definition binaryop.hpp:98
TCALC_INLINE void left(NodePtr<> left) noexcept
Set the left subnode.
Definition binaryop.hpp:77
BinaryOpNode(NodeType type)
Construct a new Binary Op Node object with no subnodes.
Definition binaryop.hpp:37
TCALC_INLINE auto & left() noexcept
Get the left subnode.
Definition binaryop.hpp:70
TCALC_INLINE auto & right() noexcept
Get the right subnode.
Definition binaryop.hpp:91
BinaryOpNode(NodeType type, NodePtr<> left, NodePtr<> right)
Construct a new Binary Op Node object with subnodes.
Definition binaryop.hpp:49
TCALC_INLINE auto & right() const noexcept
Get the right subnode.
Definition binaryop.hpp:84
TCALC_INLINE auto & left() const noexcept
Get the left subnode.
Definition binaryop.hpp:63
Base class for AST nodes.
Definition node.hpp:87
TCALC_INLINE auto type() const noexcept
Get the node type.
Definition node.hpp:109
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