UNPKG

@ton-community/tlb-parser

Version:

Parse TLB syntax into TypeScript objects

15 lines (14 loc) 434 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.withParents = withParents; const visit_1 = require("./visit"); function withParents(tree) { for (let parent of (0, visit_1.walk)(tree)) { for (let child of (0, visit_1.iterChildNodes)(parent)) { // We only set it here, so ignore // @ts-ignore child.parent = parent; } } return tree; }