From f7c89547e689b1d96af50636437ca0b5102235e0 Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Wed, 14 Aug 2019 17:57:50 -0400 Subject: [PATCH] Add template for CoverParenthesizedExpressionAndArrowParameterList --- .../default/covered-obj-prop-name.template | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/identifier-names/default/covered-obj-prop-name.template diff --git a/src/identifier-names/default/covered-obj-prop-name.template b/src/identifier-names/default/covered-obj-prop-name.template new file mode 100644 index 0000000000..4a47dd61b9 --- /dev/null +++ b/src/identifier-names/default/covered-obj-prop-name.template @@ -0,0 +1,38 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +path: language/expressions/object/covered-ident-name-prop-name-literal- +name: PropertyName in a CoverParenthesizedExpressionAndArrowParameterList +esid: prod-PropertyDefinition +info: | + ObjectLiteral : + { PropertyDefinitionList } + { PropertyDefinitionList , } + + PropertyDefinitionList: + PropertyDefinition + PropertyDefinitionList , PropertyDefinition + + PropertyDefinition: + IdentifierReference + PropertyName : AssignmentExpression + MethodDefinition + ... AssignmentExpression + ... + + PropertyName: + LiteralPropertyName + ... + + LiteralPropertyName: + IdentifierName + ... + + Reserved Words + + A reserved word is an IdentifierName that cannot be used as an Identifier. +---*/ + +var obj = ({ /*{ declareWith }*/: 42 }); + +assert.sameValue(obj['/*{ referenceWith }*/'], 42, 'property exists');