UNPKG

566 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.getSourceNodes = void 0;
4function getSourceNodes(sourceFile) {
5 const nodes = [sourceFile];
6 const result = [];
7 while (nodes.length > 0) {
8 const node = nodes.shift();
9 if (node) {
10 result.push(node);
11 if (node.getChildCount(sourceFile) >= 0) {
12 nodes.unshift(...node.getChildren());
13 }
14 }
15 }
16 return result;
17}
18exports.getSourceNodes = getSourceNodes;
19//# sourceMappingURL=get-source-nodes.js.map
\No newline at end of file