Commit Graph
5 Commits
Author SHA1 Message Date
Daniel Espeset 2fa3d94c92 Expands support for Esprima comments (#18182)
Adds an optional `comments` field to the `Program`, which will be present 
if the AST is created with Esprima using the `{ comments: true }` option.

Adds an optional `innerComments` field to `BlockStatement` which will be
present if the AST is created with Esprima using the `{ attachComments: true }`
option, given the following code:

```.js
function foo(n) {
    // comments in an empty block are `innerComments`
}
```

Note that though these fields are not specified in the ESTree specification
they extend the support already present in this set of types for 
`trailingComments` and `leadingComments`, which are also unspecified.
2017-07-24 10:03:04 -07:00
Toru Nagashima 239ac8e81e Fix estree ForXStatement#left to Pattern (#18100) 2017-07-20 09:55:31 -07:00
Ivo Gabe de Wolff 9ae701b9ed Update estree tests with nullable values 2017-04-11 10:38:04 +02:00
Ivo Gabe de Wolff 32e0e63caf Mark fields nullable 2017-04-11 10:35:41 +02:00
Andy Hanson 354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00