POC debug aid to target words in the source code

This commit is contained in:
Tangent 2023-11-20 16:35:07 -05:00
parent bc4a3d7eb7
commit ec763f1029
3 changed files with 43 additions and 7 deletions

View file

@ -1,9 +1,10 @@
import { Card, CardVm, GetField } from "./lib/card";
import { Expr } from "./lib/expr";
import { ALL as HTML } from "./lib/html";
import { parse } from "./parser";
import { runNoctl } from "./vm";
import { AsHtml, AsText, TextPiece } from "./words";
import { Card, CardVm, GetField } from './lib/card';
import { Here, RegisterJumpHere } from './lib/debug';
import { Expr } from './lib/expr';
import { ALL as HTML } from './lib/html';
import { parse } from './parser';
import { runNoctl } from './vm';
import { AsHtml, AsText, TextPiece } from './words';
/**
* Updates a card's fields
@ -120,7 +121,7 @@ function render() {
const vm: CardVm = {
mode: "render",
commands: { ...HTML, get: GetField, expr: Expr },
commands: { ...HTML, get: GetField, expr: Expr, here: Here },
output: "",
card: theCard,
};
@ -140,3 +141,5 @@ document.body.append(
state,
debugDisplay
);
RegisterJumpHere(codeInput);