Validate Syntax in StatementSplitter
Each statement will now be validated for correct syntax. When an error is found, a descriptive error will be printed to standard error and that statement will be skipped. The two types of errors that are curretly detected are unterminated subshells and unescaped parenthesis in the wrong place. More types will be added to this logic in the near future, such as unterminated braces or invalid characters in brace logic. This is the first step towards an upcoming brace expansion rewrite that I am planning to perform.
Showing
- Cargo.toml 0 additions, 1 deletionCargo.toml
- src/parser/mod.rs 1 addition, 1 deletionsrc/parser/mod.rs
- src/parser/statements.rs 62 additions, 23 deletionssrc/parser/statements.rs
- src/shell/flow.rs 20 additions, 2 deletionssrc/shell/flow.rs
- src/shell/mod.rs 23 additions, 4 deletionssrc/shell/mod.rs
Loading
Please register or sign in to comment