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

Variable node. More...

#include <variable.hpp>

Inheritance diagram for tcalc::ast::VarRefNode:
tcalc::ast::Node

Public Member Functions

 VarRefNode (std::string name)
 Construct a new Variable Node object.
 
TCALC_INLINE auto & name () const noexcept
 Get variable name.
 
TCALC_INLINE void name (std::string name) noexcept
 Set variable name.
 
- 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

Variable node.

Constructor & Destructor Documentation

◆ VarRefNode()

tcalc::ast::VarRefNode::VarRefNode ( std::string  name)
inlineexplicit

Construct a new Variable Node object.

Parameters
nameVariable name.

Member Function Documentation

◆ name() [1/2]

TCALC_INLINE auto & tcalc::ast::VarRefNode::name ( ) const
inlinenoexcept

Get variable name.

Returns
const std::string& Variable name.

◆ name() [2/2]

TCALC_INLINE void tcalc::ast::VarRefNode::name ( std::string  name)
inlinenoexcept

Set variable name.

Parameters
nameVariable name.

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