Microsoft/TypeScript — pull request #1221 by CyrusNajmabadi (2014-11-20 06:28:13+00:00)
Title: Move syntactic checks out of the parser

Being in the parser makes the incremental parser work much harder. It means any nodes with a syntactic error cannot be reused, and it also means we need a way to appropriately persist and track that information in the tree.

Around 150 errors were removed from the parser and made into grammar checks. There are still about 20 errors in the parser that i'd like to address to see if we can get down to <5. At that point, adding incremental becomes much simpler without having to maintain the invariants necessary to produce these errors.