ion merge requestshttps://gitlab.redox-os.org/redox-os/ion/-/merge_requests2018-12-12T06:25:10Zhttps://gitlab.redox-os.org/redox-os/ion/-/merge_requests/815Ready for Review- Examples benchmark script2018-12-12T06:25:10ZNick PaladinoReady for Review- Examples benchmark scriptRe purposed run_examples.sh script. SUPER WIP and first code contribution from me. Lets see how this goes!Re purposed run_examples.sh script. SUPER WIP and first code contribution from me. Lets see how this goes!https://gitlab.redox-os.org/redox-os/ion/-/merge_requests/505Change time from builtin to shell keyword.2017-09-15T00:45:41ZMichael Aaron Murphymmstick@pm.meChange time from builtin to shell keyword.*Created by: chrisvittal*
**Problem**: The `time` command could not accept shell commands like builtins or for loops. #490
**Solution**: Refactored `time` from a builtin to a keyword. That is, create a `Statement::Time` and
handle ...*Created by: chrisvittal*
**Problem**: The `time` command could not accept shell commands like builtins or for loops. #490
**Solution**: Refactored `time` from a builtin to a keyword. That is, create a `Statement::Time` and
handle the `time` logic in the execution of `Statement::Time` variants, rather than as a builtin function.
**Changes introduced by this pull request**:
- A `Time` variant of `Statement` a boxed statement member.
- Support for parsing the time keyword in `parser/statement/parse.rs` by
recursing on the rest of the input to the `parse` function when time is
encountered.
- A port of the logic from the old builtin into the `execute_toplevel`
impl for `Shell`, where instead of using the error handling from
Command, the time statement is executed through a recursive call to
`execute_toplevel`.
- The removal of all references to the old `time` builtin.
**Drawbacks**: The loss of some friendliness. The `time -h` invocation no longer works.
**TODOs**:
- Add tests.
- Time currently cannot handle multiline statements like quotes being spread over multiple lines. Fix this.
- Remove `builtins/time.rs` file
- Edit: 2017-08-23 Implemented at current, a `time` statement inside of a loop supresses all output. Fix this.
**Fixes**: #490
**State**: WIP