import { compile } from '@glyphjs/compiler';
const markdown = `
# My Document
\`\`\`ui:graph
nodes:
- id: a
label: Start
edges:
- from: a
to: b
\`\`\`
`;
const result = compile(markdown);
// result.ir -- the compiled GlyphIR document
// result.diagnostics -- any warnings or errors
API 密码
compile(markdown, options?) -- 端到端标记下- IR 汇编
translateNode(node, context) -- 将单个 AST 节点转换为 IR 块