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

Function parseArrayInitialiser

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

Source from the content-addressed store, hash-verified

128918
128919
128920function parseArrayInitialiser() {
128921 var elements = [];
128922 index = lookahead.start;
128923 expect('[');
128924
128925 while (!match(']')) {
128926 if (match(',')) {
128927 lex();
128928 elements.push(null);
128929 } else {
128930 elements.push(parseConditionalExpression());
128931
128932 if (!match(']')) {
128933 expect(',');
128934 }
128935 }
128936 }
128937
128938 lex();
128939 return finishArrayExpression(elements);
128940} // 11.1.5 Object Initialiser
128941
128942
128943function parseObjectPropertyKey() {

Callers 1

parsePrimaryExpressionFunction · 0.70

Calls 5

expectFunction · 0.70
matchFunction · 0.70
lexFunction · 0.70
finishArrayExpressionFunction · 0.70

Tested by

no test coverage detected