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