(source)
| 1837 | } |
| 1838 | |
| 1839 | cmdEval(source) { |
| 1840 | source = source.trim(); |
| 1841 | if (!source) { |
| 1842 | this.commandError('Syntax: eval <expression>'); |
| 1843 | return; |
| 1844 | } |
| 1845 | if (!this.requireBroken()) { |
| 1846 | this.showPrompt(); |
| 1847 | return; |
| 1848 | } |
| 1849 | if (!this.currentFrameValue) { |
| 1850 | this.commandError('No frame selected.'); |
| 1851 | return; |
| 1852 | } |
| 1853 | let compiled; |
| 1854 | try { |
| 1855 | compiled = Machine.compileExpression(source); |
| 1856 | } |
| 1857 | catch (e) { |
| 1858 | this.commandError(e.message); |
| 1859 | return; |
| 1860 | } |
| 1861 | this.doEval(this.currentFrameValue, compiled); |
| 1862 | } |
| 1863 | |
| 1864 | cmdDelete(args) { |
| 1865 | if (args.length < 1) { |
no test coverage detected