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

Method _consumePrefixAndName

packages/compiler/src/ml_parser/lexer.ts:788–805  ·  view source on GitHub ↗
(endPredicate: (code: number) => boolean)

Source from the content-addressed store, hash-verified

786 }
787
788 private _consumePrefixAndName(endPredicate: (code: number) => boolean): string[] {
789 const nameOrPrefixStart = this._cursor.clone();
790 let prefix: string = '';
791 while (this._cursor.peek() !== chars.$COLON && !isPrefixEnd(this._cursor.peek())) {
792 this._cursor.advance();
793 }
794 let nameStart: CharacterCursor;
795 if (this._cursor.peek() === chars.$COLON) {
796 prefix = this._cursor.getChars(nameOrPrefixStart);
797 this._cursor.advance();
798 nameStart = this._cursor.clone();
799 } else {
800 nameStart = nameOrPrefixStart;
801 }
802 this._requireCharCodeUntilFn(endPredicate, prefix === '' ? 0 : 1);
803 const name = this._cursor.getChars(nameStart);
804 return [prefix, name];
805 }
806
807 private _consumeSingleLineComment(start: CharacterCursor) {
808 const contentStart = this._cursor.clone();

Callers 4

_consumeTagOpenStartMethod · 0.95
_consumeComponentNameMethod · 0.95
_consumeAttributeNameMethod · 0.95
_consumeTagCloseMethod · 0.95

Calls 6

isPrefixEndFunction · 0.85
cloneMethod · 0.65
peekMethod · 0.65
advanceMethod · 0.65
getCharsMethod · 0.65

Tested by

no test coverage detected