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

Method _init

packages/compiler/src/i18n/extractor_merger.ts:267–284  ·  view source on GitHub ↗
(mode: _VisitorMode)

Source from the content-addressed store, hash-verified

265 visitLetDeclaration(decl: html.LetDeclaration, context: any) {}
266
267 private _init(mode: _VisitorMode): void {
268 this._mode = mode;
269 this._inI18nBlock = false;
270 this._inI18nNode = false;
271 this._depth = 0;
272 this._inIcu = false;
273 this._msgCountAtSectionStart = undefined;
274 this._errors = [];
275 this._messages = [];
276 this._inImplicitNode = false;
277 this._createI18nMessage = createI18nMessageFactory(
278 // When dropping significant whitespace we need to retain whitespace tokens or
279 // else we won't be able to reuse source spans because empty tokens would be
280 // removed and cause a mismatch.
281 /* retainEmptyTokens */ !this._preserveSignificantWhitespace,
282 /* preserveExpressionWhitespace */ this._preserveSignificantWhitespace,
283 );
284 }
285
286 private _visitElementLike(node: html.Element, context: any): html.Element | null {
287 this._mayBeAddBlockChildren(node);

Callers 2

extractMethod · 0.95
mergeMethod · 0.95

Calls 1

createI18nMessageFactoryFunction · 0.90

Tested by

no test coverage detected