(node: I18nNode)
| 96 | const children = new Set<number>(); |
| 97 | |
| 98 | function collectI18nViews(node: I18nNode) { |
| 99 | children.add(node.index); |
| 100 | |
| 101 | switch (node.kind) { |
| 102 | case I18nNodeKind.ELEMENT: |
| 103 | case I18nNodeKind.PLACEHOLDER: { |
| 104 | for (const childNode of node.children) { |
| 105 | collectI18nViews(childNode); |
| 106 | } |
| 107 | break; |
| 108 | } |
| 109 | |
| 110 | case I18nNodeKind.ICU: { |
| 111 | for (const caseNodes of node.cases) { |
| 112 | for (const caseNode of caseNodes) { |
| 113 | collectI18nViews(caseNode); |
| 114 | } |
| 115 | } |
| 116 | break; |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | // Traverse through the AST of each i18n block in the LView, |
| 122 | // and collect every instruction index. |
no test coverage detected