facebook/esprima — pull request #67 by gabelevi (2014-11-07 15:44:07+00:00)
Title: Fix parsing of generic types

Previously, the parser assumed a list of type params only included a list of type parameters. This is sort of true for declarations that declare these type parameters, like `function foo() {}`, but not true for generic types, like `var a : Map> = ...`. (Side note...it actually won't be true for anyone when [generic constraints](http://www.typescriptlang.org/Handbook#generics-generic-constraints) are added in and you can do `function foo() {}`

The one tricky thing about nested generics is that the last token in `Map>` looks like a right shift token `>>`. We need to give the lexer a hint that, while parsing types, this is not a token we're going to see.

@oyvindkinsey's transform will need to be patched when this change is deployed.