()
| 128980 | } |
| 128981 | |
| 128982 | function parseObjectInitialiser() { |
| 128983 | var properties = [], |
| 128984 | property, |
| 128985 | name, |
| 128986 | key, |
| 128987 | map = {}, |
| 128988 | toString = String; |
| 128989 | index = lookahead.start; |
| 128990 | expect('{'); |
| 128991 | |
| 128992 | while (!match('}')) { |
| 128993 | property = parseObjectProperty(); |
| 128994 | |
| 128995 | if (property.key.type === SyntaxIdentifier) { |
| 128996 | name = property.key.name; |
| 128997 | } else { |
| 128998 | name = toString(property.key.value); |
| 128999 | } |
| 129000 | |
| 129001 | key = '$' + name; |
| 129002 | |
| 129003 | if (Object.prototype.hasOwnProperty.call(map, key)) { |
| 129004 | throwError({}, MessageStrictDuplicateProperty); |
| 129005 | } else { |
| 129006 | map[key] = true; |
| 129007 | } |
| 129008 | |
| 129009 | properties.push(property); |
| 129010 | |
| 129011 | if (!match('}')) { |
| 129012 | expect(','); |
| 129013 | } |
| 129014 | } |
| 129015 | |
| 129016 | expect('}'); |
| 129017 | return finishObjectExpression(properties); |
| 129018 | } // 11.1.6 The Grouping Operator |
| 129019 | |
| 129020 | |
| 129021 | function parseGroupExpression() { |
no test coverage detected