Comments (11)
Continuing on the discussion, some issues:
- the value is alway computed. Therefore to me a
computed
flag does not feel like its referring to the value. - type
Literal | Identifier | Expression
will be simplyExpression
.
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.
@ikarienator is the proposal here diff from SpiderMonkey? If so, file an issue at estree too please?
from esprima.
@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.
This is only migrating the google code issue to here. I haven't checked estree yet.
from esprima.
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.
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.
@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.
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.
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.
Thanks! Interesting... I may want move computed
to the end of the finishProperty
method.
from esprima.
There is also commit 54f49ada87
, make sure we include the test case so that it is also covered.
from esprima.
Related Issues (20)
- npm ERR! 404 Not Found - GET https://codeload.github.com/ariya/esprima/legacy.tar.gz/master HOT 1
- Merge fixes from Contrast-Security-Inc's Fork
- npm audit report 29 vulnerabilities HOT 1
- esprima-next -> fork for development and npm package HOT 1
- High Surrogate Unicode value is wrong. HOT 1
- Replace JSF CLA with OpenJS CLA HOT 1
- Unused packages detected in the esprima project on Tag: 4.0.1 HOT 1
- [feature] esprima cannot parse bigint HOT 1
- JSX Identify the problem HOT 3
- Fails to parse access to import.meta HOT 1
- Esprima fails to parse classes that have public fields HOT 2
- Static property fails to parse HOT 1
- Feature request: Optional chaining operator HOT 9
- syntax error by rest parameter of spread syntax HOT 4
- AST_CALL is not applied on dictionary argument in a function
- Invalid UpdateExpression's arguments
- Parsing `-999999984306749440;` turns into `999999984306749400` HOT 1
- Broken link in file `docs/syntax-tree-format.md`
- Unexpected Syntax Error
- Is this project abandoned? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esprima.