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

Function parseArrayInitialiser

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

Source from the content-addressed store, hash-verified

144104 return lookahead.type === TokenKeyword && lookahead.value === keyword;
144105} // 11.1.4 Array Initialiser
144106function parseArrayInitialiser() {
144107 const elements = [];
144108 index = lookahead.start;
144109 expect("[");
144110 while(!match("]"))if (match(",")) {
144111 lex();
144112 elements.push(null);
144113 } else {
144114 elements.push(parseConditionalExpression());
144115 if (!match("]")) expect(",");
144116 }
144117 lex();
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

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