MCPcopy Create free account
hub / github.com/microsoft/SandDance / parseObjectProperty

Function parseObjectProperty

docs/tests/v2/es6/js/sanddance.js:128960–128980  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128958}
128959
128960function parseObjectProperty() {
128961 var token, key, id, value;
128962 index = lookahead.start;
128963 token = lookahead;
128964
128965 if (token.type === TokenIdentifier) {
128966 id = parseObjectPropertyKey();
128967 expect(':');
128968 value = parseConditionalExpression();
128969 return finishProperty('init', id, value);
128970 }
128971
128972 if (token.type === TokenEOF || token.type === TokenPunctuator) {
128973 throwUnexpected(token);
128974 } else {
128975 key = parseObjectPropertyKey();
128976 expect(':');
128977 value = parseConditionalExpression();
128978 return finishProperty('init', key, value);
128979 }
128980}
128981
128982function parseObjectInitialiser() {
128983 var properties = [],

Callers 1

parseObjectInitialiserFunction · 0.70

Calls 5

parseObjectPropertyKeyFunction · 0.70
expectFunction · 0.70
finishPropertyFunction · 0.70
throwUnexpectedFunction · 0.70

Tested by

no test coverage detected