Files
wehub-resource-sync c48612c494
CI / E2E Tests (push) Has been cancelled
CI / Lint, Typecheck & Unit Tests (push) Has been cancelled
Docs Build / Build docs site (push) Has been cancelled
Publish @openmaic packages / Build, validate & publish (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:03:23 +08:00

16 lines
439 B
TypeScript

// Reference: https://github.com/andrejewski/himalaya — rewritten in TypeScript with simplified functionality
import { lexer } from './lexer';
import { parser } from './parser';
import { format } from './format';
import { toHTML } from './stringify';
export type { AST } from './types';
export const toAST = (str: string) => {
const tokens = lexer(str);
const nodes = parser(tokens);
return format(nodes);
};
export { toHTML };