(&self, scope: Scope<'_>)
| 100 | } |
| 101 | |
| 102 | fn exec(&self, scope: Scope<'_>) -> CallResult<()> { |
| 103 | debug_assert_eq!(0, scope.nargs()); |
| 104 | |
| 105 | let message = scope |
| 106 | .last_error() |
| 107 | .map(|(pos, message)| format!("{}: {}", pos, message)) |
| 108 | .unwrap_or_default(); |
| 109 | scope.return_string(message) |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | /// Instantiates all REPL commands for the scripting machine and adds them to the `machine`. |