()
| 90177 | } |
| 90178 | } |
| 90179 | function commitPendingMapping() { |
| 90180 | if (!hasPending || !shouldCommitMapping()) { |
| 90181 | return; |
| 90182 | } |
| 90183 | enter(); |
| 90184 | // Line/Comma delimiters |
| 90185 | if (lastGeneratedLine < pendingGeneratedLine) { |
| 90186 | // Emit line delimiters |
| 90187 | do { |
| 90188 | appendMappingCharCode(59 /* CharacterCodes.semicolon */); |
| 90189 | lastGeneratedLine++; |
| 90190 | } while (lastGeneratedLine < pendingGeneratedLine); |
| 90191 | // Only need to set this once |
| 90192 | lastGeneratedCharacter = 0; |
| 90193 | } |
| 90194 | else { |
| 90195 | ts.Debug.assertEqual(lastGeneratedLine, pendingGeneratedLine, "generatedLine cannot backtrack"); |
| 90196 | // Emit comma to separate the entry |
| 90197 | if (hasLast) { |
| 90198 | appendMappingCharCode(44 /* CharacterCodes.comma */); |
| 90199 | } |
| 90200 | } |
| 90201 | // 1. Relative generated character |
| 90202 | appendBase64VLQ(pendingGeneratedCharacter - lastGeneratedCharacter); |
| 90203 | lastGeneratedCharacter = pendingGeneratedCharacter; |
| 90204 | if (hasPendingSource) { |
| 90205 | // 2. Relative sourceIndex |
| 90206 | appendBase64VLQ(pendingSourceIndex - lastSourceIndex); |
| 90207 | lastSourceIndex = pendingSourceIndex; |
| 90208 | // 3. Relative source line |
| 90209 | appendBase64VLQ(pendingSourceLine - lastSourceLine); |
| 90210 | lastSourceLine = pendingSourceLine; |
| 90211 | // 4. Relative source character |
| 90212 | appendBase64VLQ(pendingSourceCharacter - lastSourceCharacter); |
| 90213 | lastSourceCharacter = pendingSourceCharacter; |
| 90214 | if (hasPendingName) { |
| 90215 | // 5. Relative nameIndex |
| 90216 | appendBase64VLQ(pendingNameIndex - lastNameIndex); |
| 90217 | lastNameIndex = pendingNameIndex; |
| 90218 | } |
| 90219 | } |
| 90220 | hasLast = true; |
| 90221 | exit(); |
| 90222 | } |
| 90223 | function flushMappingBuffer() { |
| 90224 | if (mappingCharCodes.length > 0) { |
| 90225 | mappings += String.fromCharCode.apply(undefined, mappingCharCodes); |
no test coverage detected
searching dependent graphs…