UNPKG

ts-simple-ast

Version:

TypeScript compiler wrapper for AST navigation and code generation.

14 lines (13 loc) 543 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var getRangeFromArray_1 = require("./getRangeFromArray"); function fillAndGetChildren(opts) { var children = getRangeFromArray_1.getRangeFromArray(opts.allChildren, opts.index, opts.structures.length, opts.expectedKind); if (opts.fillFunction != null) { for (var i = 0; i < children.length; i++) { opts.fillFunction(children[i], opts.structures[i]); } } return children; } exports.fillAndGetChildren = fillAndGetChildren;