Add support for incremental parsing.

Right now the entrypoint just causes a full parse to happen.  But the LS code is
cleaned up to take advantage of it appropriately.

This will not be checked in until all the incremental parsing work is complete.
I’ll make that change.  (responding by email because github is acting screwy).

         -- Cyrus

From: Anders Hejlsberg [mailto:notifications@github.com]
Sent: Tuesday, December 16, 2014 5:17 PM
To: Microsoft/TypeScript
Cc: Cyrus Najmabadi
Subject: Re: [TypeScript] Add support for incremental parsing. (#1434)


In src/compiler/utilities.ts<https://github.com/Microsoft/TypeScript/pull/1434#discussion-diff-21946674>:

> @@ -734,4 +774,238 @@ module ts {

>          return false;

>      }

>

> +    var textSpanConstructor = (function () {

> +        function textSpanConstructor(start: number, length: number) {

I think it is important to have a consistent code base and I'd prefer for TextSpan to just be plain-old-data with a set of helper functions.

—
Reply to this email directly or view it on GitHub<https://github.com/Microsoft/TypeScript/pull/1434/files#r21946674>.