(endPredicate: (code: number) => boolean)
| 818 | } |
| 819 | |
| 820 | private _consumePrefixAndName(endPredicate: (code: number) => boolean): string[] { |
| 821 | const nameOrPrefixStart = this._cursor.clone(); |
| 822 | let prefix: string = ''; |
| 823 | while (this._cursor.peek() !== chars.$COLON && !isPrefixEnd(this._cursor.peek())) { |
| 824 | this._cursor.advance(); |
| 825 | } |
| 826 | let nameStart: CharacterCursor; |
| 827 | if (this._cursor.peek() === chars.$COLON) { |
| 828 | prefix = this._cursor.getChars(nameOrPrefixStart); |
| 829 | this._cursor.advance(); |
| 830 | nameStart = this._cursor.clone(); |
| 831 | } else { |
| 832 | nameStart = nameOrPrefixStart; |
| 833 | } |
| 834 | this._requireCharCodeUntilFn(endPredicate, prefix === '' ? 0 : 1); |
| 835 | const name = this._cursor.getChars(nameStart); |
| 836 | return [prefix, name]; |
| 837 | } |
| 838 | |
| 839 | private _consumeSingleLineComment(start: CharacterCursor) { |
| 840 | const contentStart = this._cursor.clone(); |
no test coverage detected