Parses tokens into an evaluable shell AST.
More...
#include <shell_parser.h>
|
|
using | expandable_ptr = std::unique_ptr< shell_node_expandable > |
| | Unique pointer to an expandable shell node (sugar syntax).
|
| |
|
using | evaluable_ptr = std::unique_ptr< shell_node_evaluable > |
| | Unique pointer to an evaluable shell node (sugar syntax).
|
| |
|
| void | increase_depth (std::size_t nPos) |
| | Increase the nesting depth and check limits.
|
| |
|
void | decrease_depth () |
| | Decrease the current nesting depth.
|
| |
|
|
static constexpr std::size_t | MAX_DEPTH = shell::MAX_DEPTH |
| | Maximum recursion depth allowed for nested constructs.
|
| |
Parses tokens into an evaluable shell AST.
- Exceptions
-
The parser consumes tokens produced by shell_tokenizer and constructs a hierarchy of shell_node objects representing shell expressions, commands, conditionals, loops, and expansions.
It is an internal helper for bs::shell and not intended for direct interaction by users.
◆ increase_depth()
| void bs::shell_parser::increase_depth |
( |
std::size_t |
nPos | ) |
|
Increase the nesting depth and check limits.
- Parameters
-
| nPos | Position of the construct causing the depth increase. |
◆ parse()
Parse input into an evaluable AST.
Reads tokens from the given input stream and produces the root node of the parsed command or expression.
- Parameters
-
| oIstream | The input token stream. |
- Returns
- The root evaluable AST node.
The documentation for this class was generated from the following files:
- /home/runner/work/bashspark/bashspark/include/BashSpark/shell/shell_parser.h
- /home/runner/work/bashspark/bashspark/src/BashSpark/shell/shell_parser.cpp