|
BashSpark
|
Base interface for nodes that expand to tokens (strings). More...
#include <shell_node.h>


Public Member Functions | |
| shell_node_expandable (const shell_node_type nType, const std::size_t nPos) | |
| Construct an expandable node. | |
| virtual void | expand (std::vector< std::string > &vTokens, shell_session &oSession, bool bSplit) const =0 |
| Expand the node into textual tokens. | |
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. | |
Additional Inherited Members | |
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. | |
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 interface for nodes that expand to tokens (strings).
Expandable nodes append one or more strings into the vTokens vector. The bSplit flag indicates whether word-splitting rules should be applied.
|
inline |
Construct an expandable node.
| nType | Node type. |
| nPos | Node position. |
|
pure virtual |
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. |
Implemented in bs::shell_node_command_expression, bs::shell_node_str, bs::shell_node_str_back, bs::shell_node_word, bs::shell_node_unicode, bs::shell_node_session_extractor, and bs::shell_node_dollar_command.