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

Function parseObjectPropertyKey

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

Source from the content-addressed store, hash-verified

128941
128942
128943function parseObjectPropertyKey() {
128944 var token;
128945 index = lookahead.start;
128946 token = lex(); // Note: This function is called only from parseObjectProperty(), where
128947 // EOF and Punctuator tokens are already filtered out.
128948
128949 if (token.type === TokenStringLiteral || token.type === TokenNumericLiteral) {
128950 if (token.octal) {
128951 throwError(token, MessageStrictOctalLiteral);
128952 }
128953
128954 return finishLiteral(token);
128955 }
128956
128957 return finishIdentifier(token.value);
128958}
128959
128960function parseObjectProperty() {
128961 var token, key, id, value;

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