Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Directive | Statement comments meaningful (estree#173)
* Make Directive | Statement comments meaningful Because a Directive is an ExpressionStatement and an ExpressionStatement is a Statement, the use of Directive | Statement option was redundant. This change attempts to capture the intent of the Directive | Statement, by making it clear that while Directive is structurally a subtype of ExpressionStatement, the directive type is not a valid addition to any ExpressionStatement, just ones that are children of a Function or Program. * Make Directive hold only Literal expressions. At the suggestion of @RReverser, express the further refinement that the subexpression of a Directive is always a Literal.
- Loading branch information