Files
DiceCloud/app/imports/parser/toString.ts
2024-02-20 23:21:12 +02:00

8 lines
245 B
TypeScript

import factories from './parseTree';
import ParseNode from '/imports/parser/parseTree/ParseNode';
export default function toString(node: ParseNode) {
if (!node) return '';
return factories[node.parseType].toString(node as any, toString);
}