google-code-export / esprima

Automatically exported from code.google.com/p/esprima
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

[ES6] Object literal property value shorthand #624

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Per Rev 31 (Jan 15 2015) of the draft spec, the relevant grammar is:

Section 12.1 Identifiers

IdentifierReference:
  Identifier
  yield

Section 12.2.5 Object Initializer

ObjectLiteral:
  {  }
  { PropertyDefinitionList }
  { PropertyDefinitionList, }

PropertyDefinitionList:
  PropertyDefinition
  PropertyDefinitionList  , PropertyDefinition

PropertyDefinition:
  IdentifierReference
  CoverInitializedName
  PropertyName : AssignmentExpression
  MethodDefinition

Original issue reported on code.google.com by ariya.hi...@gmail.com on 19 Jan 2015 at 6:18

GoogleCodeExporter commented 9 years ago
Related implementation in the harmony branch: issue 252.

Original comment by ariya.hi...@gmail.com on 19 Jan 2015 at 6:19

GoogleCodeExporter commented 9 years ago
See also 
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object-initializer.

Original comment by ariya.hi...@gmail.com on 19 Jan 2015 at 6:19

GoogleCodeExporter commented 9 years ago
ES6 object literal property value shorthand.
https://github.com/ariya/esprima/commit/9365f9f993

ES6 property shorthand: update baseline syntax for parsing corpus.
https://github.com/ariya/esprima/commit/8efde4447c

Original comment by ariya.hi...@gmail.com on 19 Jan 2015 at 4:29