tcalc 0.2.0
 
Loading...
Searching...
No Matches
tcalc::ast::UnaryOpNode Class Reference

Unary operation node. More...

#include <unaryop.hpp>

Inheritance diagram for tcalc::ast::UnaryOpNode:
tcalc::ast::Node

Public Member Functions

 UnaryOpNode (NodeType type)
 Construct a new Unary Op Node object without operand.
 
 UnaryOpNode (NodeType type, NodePtr<> operand)
 Construct a new Unary Op Node object with operand.
 
TCALC_INLINE auto & operand () const noexcept
 Get operand.
 
TCALC_INLINE auto & operand () noexcept
 Get operand.
 
TCALC_INLINE void operand (NodePtr<> operand) noexcept
 Set operand.
 
- Public Member Functions inherited from tcalc::ast::Node
 Node (NodeType type)
 Construct a new Node object.
 
TCALC_INLINE auto type () const noexcept
 Get the node type.
 

Detailed Description

Unary operation node.

Constructor & Destructor Documentation

◆ UnaryOpNode() [1/2]

tcalc::ast::UnaryOpNode::UnaryOpNode ( NodeType  type)
inlineexplicit

Construct a new Unary Op Node object without operand.

Parameters
typeNode type.

◆ UnaryOpNode() [2/2]

tcalc::ast::UnaryOpNode::UnaryOpNode ( NodeType  type,
NodePtr<>  operand 
)
inline

Construct a new Unary Op Node object with operand.

Parameters
typeNode type.
operandOperand node.

Member Function Documentation

◆ operand() [1/3]

TCALC_INLINE auto & tcalc::ast::UnaryOpNode::operand ( ) const
inlinenoexcept

Get operand.

Returns
const NodePtr<>& Operand node.

◆ operand() [2/3]

TCALC_INLINE auto & tcalc::ast::UnaryOpNode::operand ( )
inlinenoexcept

Get operand.

Returns
NodePtr<>& Operand node.

◆ operand() [3/3]

TCALC_INLINE void tcalc::ast::UnaryOpNode::operand ( NodePtr<>  operand)
inlinenoexcept

Set operand.

Parameters
operandOperand node.

The documentation for this class was generated from the following file: