1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.getSourceNodes = void 0;
|
4 | function 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 | }
|
18 | exports.getSourceNodes = getSourceNodes;
|
19 | //# sourceMappingURL=get-source-nodes.js.map |
\ | No newline at end of file |