MCPcopy Create free account
hub / github.com/angular/angular / collectI18nViews

Function collectI18nViews

packages/core/src/hydration/i18n.ts:98–119  ·  view source on GitHub ↗
(node: I18nNode)

Source from the content-addressed store, hash-verified

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.

Callers 1

collectI18nChildrenFunction · 0.85

Calls 1

addMethod · 0.65

Tested by

no test coverage detected