POC debug aid to target words in the source code
This commit is contained in:
parent
bc4a3d7eb7
commit
ec763f1029
3 changed files with 43 additions and 7 deletions
src
17
src/3x5.ts
17
src/3x5.ts
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue