Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES6 feature: Meta property #1203

Closed
ariya opened this issue Jun 25, 2015 · 4 comments
Closed

ES6 feature: Meta property #1203

ariya opened this issue Jun 25, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@ariya
Copy link
Contributor

ariya commented Jun 25, 2015

Syntax:

NewTarget : new . target

Spec:

https://people.mozilla.org/~jorendorff/es6-draft.html#sec-meta-properties

Relevant AST interfaces (from https://github.com/estree/estree):

interface MetaProperty <: Expression {
    type: "MetaProperty";
    meta: Identifier;
    property: Identifier;
}
@ariya ariya self-assigned this Jun 25, 2015
@ariya ariya added the es6 label Jun 25, 2015
@ariya ariya added this to the 2.5 milestone Jun 25, 2015
@mikesherov mikesherov mentioned this issue Jun 25, 2015
25 tasks
ariya added a commit to ariya/esprima that referenced this issue Jun 29, 2015
ariya added a commit to ariya/esprima that referenced this issue Jun 30, 2015
@ariya
Copy link
Contributor Author

ariya commented Jun 30, 2015

There is a problem. The lengthy discussion estree/estree#32 reached the consensus to go with the generic MetaProperty node. In the mean time, according to https://bugzilla.mozilla.org/show_bug.cgi?id=1141865, Mozilla SpiderMonkey is going with NewTargetExpression. See the code at https://hg.mozilla.org/mozilla-central/file/tip/js/src/jsast.tbl.

@jorendorff Is this decision final? Shall I file a Bugzilla issue? Please advise.

@jorendorff
Copy link

No, the decision was out of pure expedience. We don't want to keep it. It's a matter of someone finding time to fix it. See https://bugzilla.mozilla.org/show_bug.cgi?id=1168992 .

@jorendorff
Copy link

Eric Faust reminded me that one reason we've held off fixing it is that our internal parse tree doesn't contain location information for each individual part of the new.target. Some of that has been fixed as we implemented super().

ariya added a commit to ariya/esprima that referenced this issue Jul 1, 2015
@ariya
Copy link
Contributor Author

ariya commented Jul 1, 2015

@jorendorff Thank you for the prompt response and excellent explanation! In mean time, we will go ahead and implement it as MetaProperty.

@ariya ariya closed this as completed in c761ec1 Jul 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants