benjamn/ast-types — pull request #48 by gabelevi (2014-07-29 15:47:44+00:00)
Title: Fix a few small issues I found in ast-types definitions:

1) The left side of an assignment really should be a pattern. The SpiderMonkey
API does seem to be wrong here. Esprima will return a pattern for the left side
of the assignment. For example:

> esprima.parse("[a,b] = [1,2]").body[0].expression.left.type
"ArrayPattern"

2) I believe the holes in the defaults array in a function definition should be
represented by null. This seems more consistant with other places where a node
is missing. However the SpiderMonkey API doesn't allow for null and Esprima
will use undefined. This change just makes the definition a little more general
to support null if a parser were to return that.

3) Adding `ClassProperty` to the AST. This is for parsing things like
typescript class properties. Facebook's fork of Esprima's harmony branch
supports this with the ClassProperty node:
https://github.com/facebook/esprima/blob/fb-harmony/esprima.js#L2144

This is for code like

class Foo {
bar: string;
}