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

Function rawExprFromSpan

packages/compiler-cli/preprocessor/src/processor.ts:2958–2964  ·  view source on GitHub ↗
(
    span: nga.SpanMetadata | undefined | null,
    functionSpans?: nga.SpanMetadata[],
  )

Source from the content-addressed store, hash-verified

2956 // We reproduce "the raw node" by slicing the original source text at the captured span.
2957 const guards = ctx.complianceMode ? [] : (classMeta?.laterDeclarationReferences ?? []);
2958 const rawExprFromSpan = (
2959 span: nga.SpanMetadata | undefined | null,
2960 functionSpans?: nga.SpanMetadata[],
2961 ): o.Expression | null =>
2962 span && content !== undefined
2963 ? new o.WrappedNodeExpr(new RawSource(sliceGuarded(content, span, guards, functionSpans)))
2964 : null;
2965
2966 const rawExprsFromSpans = (
2967 spans: nga.SpanMetadata[] | undefined | null,

Callers 1

compileNgModuleDefFunction · 0.85

Calls 1

sliceGuardedFunction · 0.85

Tested by

no test coverage detected