(endPredicate: (code: number) => boolean)
| 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(); |
no test coverage detected