mdz_opcodes_to_nodes.ts

Converts a stream of mdz opcodes to the MdzNode[] tree representation.

Stack-based replay: open pushes a frame, close pops and builds the node, text/void create leaf nodes, append_text extends the last text node, revert undoes an optimistic open and re-parents children.

The output is identical to mdz_parse() from mdz.ts, enabling validation of the streaming parser against the existing fixture suite.

Declarations
#

view source

mdz_opcodes_to_nodes
#

mdz_opcodes_to_nodes.ts view source

(opcodes: MdzOpcode[]): MdzNode[] import {mdz_opcodes_to_nodes} from '@fuzdev/fuz_ui/mdz_opcodes_to_nodes.js';

Convert an array of mdz opcodes to the MdzNode[] tree. Produces output identical to mdz_parse().

opcodes

type MdzOpcode[]

returns

MdzNode[]

Depends on
#