|
BashSpark
|
Base for string-like nodes composed of expandable fragments. More...
#include <shell_node.h>


Public Member Functions | |||||||
| void | expand (std::vector< std::string > &vTokens, shell_session &oSession, bool bSplit) const override | ||||||
Expand by concatenating child fragments into one token. Expand the node into textual tokens.
| |||||||
| const std::vector< std::unique_ptr< shell_node_expandable > > & | get_children () const noexcept | ||||||
| Get the children fragments. | |||||||
Public Member Functions inherited from bs::shell_node_expandable | |||||||
| shell_node_expandable (const shell_node_type nType, const std::size_t nPos) | |||||||
| Construct an expandable node. | |||||||
Public Member Functions inherited from bs::shell_node | |||||||
| virtual | ~shell_node ()=default | ||||||
| Virtual default destructor for polymorphic deletion. | |||||||
| shell_node_type | get_type () const noexcept | ||||||
| Get the node type. | |||||||
| std::size_t | get_pos () const noexcept | ||||||
| Get node position in the original input stream. | |||||||
Protected Member Functions | |
| shell_node_str (shell_node_type nType, std::size_t nPos, std::vector< std::unique_ptr< shell_node_expandable > > &&vChildren) | |
| Construct a string node. | |
Protected Member Functions inherited from bs::shell_node | |
| shell_node (const shell_node_type nType, const std::size_t nPos) | |
| Protected constructor used by derived classes. | |
Additional Inherited Members | |
Protected Attributes inherited from bs::shell_node | |
| const shell_node_type | m_nType |
| Node type. | |
| const std::size_t | m_nPos |
| Position in the input stream. | |
Base for string-like nodes composed of expandable fragments.
Used by quoted and unquoted string types. Holds child expandables which are concatenated during expansion.
|
protected |
Construct a string node.
| shell_node_invalid_argument | If vChildren contains null pointer. |
| nType | Specific string node type. |
| nPos | Position in the input stream. |
| vChildren | Child expandable fragments. |
|
overridevirtual |
Expand by concatenating child fragments into one token. Expand the node into textual tokens.
| vTokens | Vector where generated token strings will be appended. |
| oSession | Session context (used for variable/argument lookup, etc.). |
| bSplit | When true apply word-splitting semantics; otherwise keep as single token. |
Implements bs::shell_node_expandable.
|
inlinenoexcept |
Get the children fragments.