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

Function parseObjectPropertyKey

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

Source from the content-addressed store, hash-verified

144118 return finishArrayExpression(elements);
144119} // 11.1.5 Object Initialiser
144120function parseObjectPropertyKey() {
144121 index = lookahead.start;
144122 const token = lex(); // Note: This function is called only from parseObjectProperty(), where
144123 // EOF and Punctuator tokens are already filtered out.
144124 if (token.type === TokenStringLiteral || token.type === TokenNumericLiteral) {
144125 if (token.octal) throwError(token, MessageStrictOctalLiteral);
144126 return finishLiteral(token);
144127 }
144128 return finishIdentifier(token.value);
144129}
144130function parseObjectProperty() {
144131 var token, key, id, value;
144132 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