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

Method _commentStart

packages/compiler/src/expression_parser/parser.ts:455–475  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

453 }
454
455 private _commentStart(input: string): number | null {
456 let outerQuote: number | null = null;
457 for (let i = 0; i < input.length - 1; i++) {
458 const char = input.charCodeAt(i);
459 const nextChar = input.charCodeAt(i + 1);
460
461 if (char === chars.$BACKSLASH) {
462 i++;
463 continue;
464 }
465
466 if (char === chars.$SLASH && nextChar == chars.$SLASH && outerQuote == null) return i;
467
468 if (outerQuote === char) {
469 outerQuote = null;
470 } else if (outerQuote == null && chars.isQuote(char)) {
471 outerQuote = char;
472 }
473 }
474 return null;
475 }
476
477 private _checkNoInterpolation(
478 errors: ParseError[],

Callers 1

_stripCommentsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected