type Tree*[T] = ref object of RootObj obj*: T children*: seq[ASTNode[T]] ASTNode*[T] = ref object of Tree[T] obj_type*: Tree[T] proc add_child*(parent :var ASTNode[string], child : ASTNode[string]): bool = add parent.children, child proc set_children_array(parent : ASTNode[string], children_array : seq[ASTNode[string]]): bool = for i in 0.. 0: result &= "(" for i in 0..