MCPcopy Index your code
hub / github.com/angular/angular / addParseSpanInfo

Method addParseSpanInfo

packages/compiler/src/typecheck/ops/codegen.ts:58–72  ·  view source on GitHub ↗

* Adds a synthetic comment to the expression that represents the parse span of the provided node. * This comment can later be retrieved as trivia of a node to recover original source locations. * @param span Span from the parser containing the location information.

(span: AbsoluteSourceSpan | ParseSourceSpan)

Source from the content-addressed store, hash-verified

56 * @param span Span from the parser containing the location information.
57 */
58 addParseSpanInfo(span: AbsoluteSourceSpan | ParseSourceSpan): this {
59 let start: number;
60 let end: number;
61
62 if (span instanceof AbsoluteSourceSpan) {
63 start = span.start;
64 end = span.end;
65 } else {
66 start = span.start.offset;
67 end = span.end.offset;
68 }
69
70 this.spanComment = `${start},${end}`;
71 return this;
72 }
73
74 /** Marks the expression to be ignored for diagnostics. */
75 markIgnoreDiagnostics(): this {

Callers 15

visitBinaryMethod · 0.95
visitChainMethod · 0.95
visitLiteralMapMethod · 0.95
visitSpreadElementMethod · 0.95
visitEmptyExprMethod · 0.95
visitArrowFunctionMethod · 0.95
executeMethod · 0.95
executeMethod · 0.95
executeMethod · 0.95
executeMethod · 0.95
executeMethod · 0.95
resolveMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected