MCPcopy
hub / github.com/angular/angular / recordUnparsed

Method recordUnparsed

packages/compiler/test/expression_parser/utils/unparser.ts:286–291  ·  view source on GitHub ↗
(ast: any, spanKey: string, unparsedList: UnparsedWithSpan[])

Source from the content-addressed store, hash-verified

284 const source = ast.source!;
285 const recursiveSpanUnparser = new (class extends RecursiveAstVisitor {
286 private recordUnparsed(ast: any, spanKey: string, unparsedList: UnparsedWithSpan[]) {
287 const span = ast[spanKey];
288 const prefix = spanKey === 'span' ? '' : `[${spanKey}] `;
289 const src = source.substring(span.start, span.end);
290 unparsedList.push([unparse(ast), prefix + src]);
291 }
292
293 override visit(ast: AST, unparsedList: UnparsedWithSpan[]) {
294 this.recordUnparsed(ast, 'span', unparsedList);

Callers 1

visitMethod · 0.80

Calls 2

unparseFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected