Git Product home page Git Product logo

Comments (11)

ikarienator avatar ikarienator commented on May 23, 2024

Continuing on the discussion, some issues:

  1. the value is alway computed. Therefore to me a computed flag does not feel like its referring to the value.
  2. type Literal | Identifier | Expression will be simply Expression.

My suggestion will be:

interface ObjectExpression <: Expression {
    type: "ObjectExpression";
    properties: [ Property ];
}

interface Property {
    kind: "init" | "get" | "set";
    name: Expression;
    computed: boolean;
    value: Expression;
}

from esprima.

mikesherov avatar mikesherov commented on May 23, 2024

@ikarienator is the proposal here diff from SpiderMonkey? If so, file an issue at estree too please?

from esprima.

ariya avatar ariya commented on May 23, 2024

@ikarienator I agree with @mikesherov. Since computed flag is already becoming almost the de-facto standard, we should stick with this for now and brainstorm the further enhancement at estree.

from esprima.

ikarienator avatar ikarienator commented on May 23, 2024

This is only migrating the google code issue to here. I haven't checked estree yet.

from esprima.

ikarienator avatar ikarienator commented on May 23, 2024

I checked estree and it does not include much es6 contents. It does not include computed property name among other features. Why do we want to keep sync with it? https://github.com/shapesecurity/shift-spec/tree/es6 has a very complete and up to date definition of ES6 AST and very few issues if any. It is described in a compilable WebIDL. We can probably be more compliant to that than estree.

Are we trying to make the ES6 AST additive to the ES5 one? I'm not sure it's possible.

from esprima.

mikesherov avatar mikesherov commented on May 23, 2024

Let's discuss at the meeting on Wednesday then. The idea is compat with acorn and spidermonkey, several of which have living breathing es6 implementations in current versions.

from esprima.

ariya avatar ariya commented on May 23, 2024

@ikarienator Unfortunately that how's been implemented in the harmony branch so far. It seems to be less troublesome to support incremental addition, even it's not perfect, in the current situation.

from esprima.

ikarienator avatar ikarienator commented on May 23, 2024

Make sense. I will create issues in estree to address missing features that
has been implemented in harmony and master. Michael, what is the problem
preventing us from having a maximally additive ES6 AST in shift spec?
On Sat, Feb 14, 2015 at 13:28 Ariya Hidayat [email protected]
wrote:

@ikarienator https://github.com/ikarienator Unfortunately that how's
been implemented in the harmony branch so far. It seems to be less
troublesome to support incremental addition, even it's not perfect, in the
current situation.


Reply to this email directly or view it on GitHub
#1037 (comment).

from esprima.

ariya avatar ariya commented on May 23, 2024

BTW, the more proper old bug to be referred is this one: https://code.google.com/p/esprima/issues/detail?id=480. The corresponding harmony branch implementation is in commit 2bb17ef.

from esprima.

ikarienator avatar ikarienator commented on May 23, 2024

Thanks! Interesting... I may want move computed to the end of the finishProperty method.

from esprima.

ariya avatar ariya commented on May 23, 2024

There is also commit 54f49ada87, make sure we include the test case so that it is also covered.

from esprima.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.