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

Function parseObjectPropertyKey

docs/tests/v3/es6/js/sanddance-test-es6.js:92051–92060  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

92049 return finishArrayExpression(elements);
92050} // 11.1.5 Object Initialiser
92051function parseObjectPropertyKey() {
92052 index = lookahead.start;
92053 const token = lex(); // Note: This function is called only from parseObjectProperty(), where
92054 // EOF and Punctuator tokens are already filtered out.
92055 if (token.type === TokenStringLiteral || token.type === TokenNumericLiteral) {
92056 if (token.octal) throwError(token, MessageStrictOctalLiteral);
92057 return finishLiteral(token);
92058 }
92059 return finishIdentifier(token.value);
92060}
92061function parseObjectProperty() {
92062 var token, key, id, value;
92063 index = lookahead.start;

Callers 1

parseObjectPropertyFunction · 0.70

Calls 4

lexFunction · 0.70
throwErrorFunction · 0.70
finishLiteralFunction · 0.70
finishIdentifierFunction · 0.70

Tested by

no test coverage detected