chore: establish learning module baseline

This commit is contained in:
inman
2026-08-16 14:58:47 +08:00
commit 2d04197f3f
2409 changed files with 533050 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
// 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 };