X-Git-Url: https://git.kianting.info/?a=blobdiff_plain;f=docs%2Ftypes%2Fparser.tkTree.html;fp=docs%2Ftypes%2Fparser.tkTree.html;h=1587548f4d0270408ae50d991155d40e49ec27b4;hb=c3dc58d74afa6b298d84bad90d63c027a32a954a;hp=0000000000000000000000000000000000000000;hpb=796e0c20c767e214b104fa3d17e754ce58da6e73;p=clo diff --git a/docs/types/parser.tkTree.html b/docs/types/parser.tkTree.html new file mode 100644 index 0000000..1587548 --- /dev/null +++ b/docs/types/parser.tkTree.html @@ -0,0 +1,67 @@ +tkTree | clo
+
+ +
+
+
+
+ +

Type alias tkTree

+
tkTree: string | tkTree[]
+

convert a tkTree AST to S-expr string

+
+
+

Param

the tkTree

+ +

Returns

S-expr String

+

export function tkTreeToSExp(t: tkTree): string{ + var str = "";

+

if (Array.isArray(t)){ + let strArray = t.map((x)=>tkTreeToSExp(x)); + str = "(" + strArray.join("◎") + ")"; + }else{ + if (t=== undefined){ + str = "%undefined" + }else{ + str = t; + } + }

+

return str; +}

+
+
+ +
+
+

Generated using TypeDoc

+
\ No newline at end of file