(endPredicate: (code: number) => boolean)
| 803 | } |
| 804 | |
| 805 | private _consumePrefixAndName(endPredicate: (code: number) => boolean): string[] { |
| 806 | const nameOrPrefixStart = this._cursor.clone(); |
| 807 | let prefix: string = ''; |
| 808 | while (this._cursor.peek() !== chars.$COLON && !isPrefixEnd(this._cursor.peek())) { |
| 809 | this._cursor.advance(); |
| 810 | } |
| 811 | let nameStart: CharacterCursor; |
| 812 | if (this._cursor.peek() === chars.$COLON) { |
| 813 | prefix = this._cursor.getChars(nameOrPrefixStart); |
| 814 | this._cursor.advance(); |
| 815 | nameStart = this._cursor.clone(); |
| 816 | } else { |
| 817 | nameStart = nameOrPrefixStart; |
| 818 | } |
| 819 | this._requireCharCodeUntilFn(endPredicate, prefix === '' ? 0 : 1); |
| 820 | const name = this._cursor.getChars(nameStart); |
| 821 | return [prefix, name]; |
| 822 | } |
| 823 | |
| 824 | private _consumeSingleLineComment(start: CharacterCursor) { |
| 825 | const contentStart = this._cursor.clone(); |
no test coverage detected