From f10794be742c7fd5b24ab6db06b52f20389f5ee5 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Fri, 21 Nov 2014 16:42:49 -0800 Subject: [PATCH] Simplify rewind points. --- src/services/syntax/incrementalParser.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/services/syntax/incrementalParser.ts b/src/services/syntax/incrementalParser.ts index 68c492853dd..273b3eec5fe 100644 --- a/src/services/syntax/incrementalParser.ts +++ b/src/services/syntax/incrementalParser.ts @@ -128,12 +128,7 @@ module TypeScript.IncrementalParser { var rewindPoint = _scannerParserSource.getRewindPoint(); // Clone our cursor. That way we can restore to that point if the parser needs to rewind. - var oldSourceUnitCursorClone = cloneSyntaxCursor(_oldSourceUnitCursor); - - // Store where we were when the rewind point was created. - rewindPoint.oldSourceUnitCursor = _oldSourceUnitCursor; - - _oldSourceUnitCursor = oldSourceUnitCursorClone; + rewindPoint.oldSourceUnitCursor = cloneSyntaxCursor(_oldSourceUnitCursor); _outstandingRewindPointCount++; return rewindPoint;