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

Function node. More...

#include <function.hpp>

Inheritance diagram for tcalc::ast::FcallNode:
tcalc::ast::Node

Public Member Functions

 FcallNode (std::string name)
 Construct a new Function Node object.
 
 FcallNode (std::string name, std::vector< NodePtr<> > args)
 Construct a new Function Node object.
 
TCALC_INLINE auto & args () const noexcept
 Get function arguments.
 
TCALC_INLINE auto & args () noexcept
 Get function arguments.
 
TCALC_INLINE void push_arg (const NodePtr<> &arg)
 Push a function argument.
 
TCALC_INLINE auto & name () const noexcept
 Get function name.
 
TCALC_INLINE void name (std::string name)
 Set function 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

Function node.

Constructor & Destructor Documentation

◆ FcallNode() [1/2]

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

Construct a new Function Node object.

Parameters
nameFunction name.

◆ FcallNode() [2/2]

tcalc::ast::FcallNode::FcallNode ( std::string  name,
std::vector< NodePtr<> >  args 
)
inline

Construct a new Function Node object.

Parameters
nameFunction name.
argsFunction arguments.

Member Function Documentation

◆ args() [1/2]

TCALC_INLINE auto & tcalc::ast::FcallNode::args ( ) const
inlinenoexcept

Get function arguments.

Returns
const std::vector<NodePtr<>>& Function arguments.

◆ args() [2/2]

TCALC_INLINE auto & tcalc::ast::FcallNode::args ( )
inlinenoexcept

Get function arguments.

Returns
std::vector<NodePtr<>>& Function arguments.

◆ name() [1/2]

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

Get function name.

Returns
const std::string& Function name.

◆ name() [2/2]

TCALC_INLINE void tcalc::ast::FcallNode::name ( std::string  name)
inline

Set function name.

Parameters
nameFunction name.

◆ push_arg()

TCALC_INLINE void tcalc::ast::FcallNode::push_arg ( const NodePtr<> &  arg)
inline

Push a function argument.

Parameters
argArgument to push.

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