|
BashSpark
|
Represents a continue statement inside a loop.
More...
#include <shell_node.h>


Classes | |
| class | continue_signal |
| Exception used internally to signal a loop "continue". More... | |
Public Member Functions | |
| shell_status | evaluate (shell_session &oSession) const override |
Evaluate the continue node. | |
| shell_node_continue (const std::size_t nPos) | |
Construct a continue node. | |
Public Member Functions inherited from bs::shell_node_evaluable | |
| shell_node_evaluable (const shell_node_type nType, const std::size_t nPos) | |
| Construct an evaluable 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. | |
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. | |
Represents a continue statement inside a loop.
When evaluated, this node throws a continue_signal exception to unwind the evaluator up to the nearest loop construct (for, while, until). This matches the behavior of shell continue statements.
|
inlineexplicit |
Construct a continue node.
| nPos | Position in the input stream. |
|
overridevirtual |
Evaluate the continue node.
Evaluation immediately throws a continue_signal which is expected to be caught by the nearest loop node (shell_node_for, shell_node_while, shell_node_until).
| oSession | Session context (unused). |
| shell_node_continue::continue_signal | Always thrown. |
Implements bs::shell_node_evaluable.