()
| 90426 | mappings.charCodeAt(pos) === 59 /* CharacterCodes.semicolon */); |
| 90427 | } |
| 90428 | function base64VLQFormatDecode() { |
| 90429 | var moreDigits = true; |
| 90430 | var shiftCount = 0; |
| 90431 | var value = 0; |
| 90432 | for (; moreDigits; pos++) { |
| 90433 | if (pos >= mappings.length) |
| 90434 | return setError("Error in decoding base64VLQFormatDecode, past the mapping string"), -1; |
| 90435 | // 6 digit number |
| 90436 | var currentByte = base64FormatDecode(mappings.charCodeAt(pos)); |
| 90437 | if (currentByte === -1) |
| 90438 | return setError("Invalid character in VLQ"), -1; |
| 90439 | // If msb is set, we still have more bits to continue |
| 90440 | moreDigits = (currentByte & 32) !== 0; |
| 90441 | // least significant 5 bits are the next msbs in the final value. |
| 90442 | value = value | ((currentByte & 31) << shiftCount); |
| 90443 | shiftCount += 5; |
| 90444 | } |
| 90445 | // Least significant bit if 1 represents negative and rest of the msb is actual absolute value |
| 90446 | if ((value & 1) === 0) { |
| 90447 | // + number |
| 90448 | value = value >> 1; |
| 90449 | } |
| 90450 | else { |
| 90451 | // - number |
| 90452 | value = value >> 1; |
| 90453 | value = -value; |
| 90454 | } |
| 90455 | return value; |
| 90456 | } |
| 90457 | } |
| 90458 | ts.decodeMappings = decodeMappings; |
| 90459 | function sameMapping(left, right) { |
no test coverage detected
searching dependent graphs…