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

Function parseObjectProperty

docs/app/js/sanddance-app.js:144130–144147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144128 return finishIdentifier(token.value);
144129}
144130function parseObjectProperty() {
144131 var token, key, id, value;
144132 index = lookahead.start;
144133 token = lookahead;
144134 if (token.type === TokenIdentifier) {
144135 id = parseObjectPropertyKey();
144136 expect(":");
144137 value = parseConditionalExpression();
144138 return finishProperty("init", id, value);
144139 }
144140 if (token.type === TokenEOF || token.type === TokenPunctuator) throwUnexpected(token);
144141 else {
144142 key = parseObjectPropertyKey();
144143 expect(":");
144144 value = parseConditionalExpression();
144145 return finishProperty("init", key, value);
144146 }
144147}
144148function parseObjectInitialiser() {
144149 var properties = [], property, name, key, map = {}, toString = String;
144150 index = lookahead.start;

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