Typescript all the parser things
This commit is contained in:
7
app/imports/parser/toString.ts
Normal file
7
app/imports/parser/toString.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user