Compiles Glyph markdown into a validated IR (Intermediate Representation) with schema validation and diagnostics.
Install
pnpm add @glyphjs/compiler
Usage
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