(_hs)
| 28 | }); |
| 29 | |
| 30 | function registerCommands(_hs) { |
| 31 | _hs.addCommand("breakpoint", function (parser) { |
| 32 | if (!parser.matchToken("breakpoint")) return; |
| 33 | |
| 34 | return { |
| 35 | type: "breakpointCommand", |
| 36 | execute: function (ctx) { |
| 37 | ctx.meta.command = this; |
| 38 | return ctx.meta.runtime.unifiedExec(this, ctx); |
| 39 | }, |
| 40 | resolve: function (ctx) { |
| 41 | globalThis._hyperscript.hdb = HDB(ctx, ctx.meta.runtime, this, _hs); |
| 42 | |
| 43 | if (!_hs.debuggerOpen) { |
| 44 | return ctx.meta.runtime.findNext(this, ctx); |
| 45 | } |
| 46 | |
| 47 | try { |
| 48 | return globalThis._hyperscript.hdb.break(ctx); |
| 49 | } catch (e) { |
| 50 | console.error(e, e.stack); |
| 51 | } |
| 52 | }, |
| 53 | }; |
| 54 | }); |
| 55 | } |
| 56 | |
| 57 | function escapeHTML(unsafe) { |
| 58 | return unsafe |
no test coverage detected